Please contact <the author> if you run into bugs or if you want to make use of features that are not implemented yet. For questions about layout or help adapting your figures to the CPB-style, please contact the Communication Department. Please beware that browsers other than Chrome may not display this manual correctly.
This manual explains how to create customizable CPB-style figures with James from Excel and R. James’ goal is to tackle most of the CEP/MEV figures, which amounts mainly to customizable line and bar figures, scatter plots and fan charts - brightened up with some text labels. This novel version of James aims to
style = wide)style = english)style = no-title, no-legend)turn = y)logo_show = y)The general workflow to create figures with James is:
M:/p_james/dev to the path where you want to create figures.xlsx files it sees.generated/ with your figuresThe bat (or sh) file will warn you if you don’t make use of the latest and greatest version of the software.
So, how to start now? This manual recommends to first get some experience by running through the following section. Next, you can skip through this manual and find a figure with a style you like. Below that figure you’ll read how to recreate that figure. You can use that as a starting point and adapt it to your personal needs. Tip: use \(<\)Control\(>\)+F to quickly find terms in this manual.
The following figure is a so-called ‘Hello World’ example. Directly below the figure you’ll find the instructions to reproduce it (in green).
|
|
Relevant parameters:
|
||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||
|
|
Relevant parameters:
|
||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||
If you succeed to reproduce the above figure(s), you’re ready to learn more!
Parameter type specifies how the time series should appear in your figure. If you leave parameter type empty, it will default to type = line. If you specify only one value (e.g. type = bar--), James will use that value for each of the time series in your data. If want to mix different types, then you should specify the type for each of your time series. In which case the type’s n’th element corresponds to the n’th time series in your data. In particular, time series that are described with two columns of data (e.g. fan/bandwidth/area and whiskers), also need two values for parameter type.
Parameter
typemust have either zero values, one value, or n values. In case of zero values it defaults tolinefor all time series. In case of one value, this type will be used for all time series in your data. Otherwise, n should equal the number of time series columns in your data (i.e. all, exclusive the x-axis).
Section ‘A kick-start example’ shows how to create a line figure with two series. Implicitely, the parameter type = line (or type = line, line) is set there.
Some examples of figures with lines: Two bandwiths in one plot, Oversterfte in 2020, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Groeibijdragen bestedingen, Economische groei in Nederland.
A discontinuity works as follows. The data for the x-axis, in the first column of your xlsx-file, needs values everywhere. So, you should provide an x-value at the position where you want the discontinuity. You can leave the cell, which corresponds to the position of the discontinuity in the respective series, empty. Please look at the xlsx-file (link below figure) to see how that’s done here. This example also shows how to put multiple variants of the same series in the same plot.
|
You can take a look at the xlsx-file to see how this is done. |
Relevant parameters:
|
||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||
Next to the default ‘solid’ line (i.e. line_lty= 1) there are five other line types you can choose from. The order of the values you give to a parameter corresponds to the order of the lines. So, the first value corresponds to the first line, the second value to the second line, etc.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||
You can decorate your line with dots, diamonds or other symbols. This figure shows the available symbols. The symbols are superimposed at the data points you provide in your data tab. An example:
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||
The following example adds a ‘rose’-colored diamond to the second time series. The diamond is automatically added to the legend too.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||
You can use the following parameters to customize lines. Please beware that the order of the values you give to a parameter corresponds to the order of the lines; i.e., not necessarily to the order of the time series if some of them are not lines. So, the first value corresponds to the first line, the second value to the second line, etc.
line_lty: line type (1: continuous; 2, 3, … have dashes). For dashes the advice is to use 3. Please beware that the forecasted part of a line is automatically dashed, unless you specify this parameter. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 1, 3, 1 if the third line is dashed. For the default style the value is 1. See also parameter(s): line_obs_fc_lty. Figure(s) using ‘line_lty’: Six different line types, Two bandwiths in one plot, Oversterfte in 2020, Groeibijdragen bestedingen, trend-vs-niveau.
line_symbol: add a symbol to your line. This may be e.g. a dot (1, 19, 20) or a diamond (18). The symbol will be added at the data points that define your line. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 1, 2, …, 23. For the default style the value is 0. See also parameter(s): dot_shape. Figure(s) using ‘line_symbol’: Ontwikkeling EMU-schuld in schokscenario’s.
Bars can be next to each other (type = bar--) or stacked (type = bar=) or a combination of the two.
Type bar= puts bars next to each other.
|
|
Relevant parameters:
|
||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||
In this example there is no data given for years 1952 … 1955. Therefore, you see a ‘gap’ between the subsequent sets of bars. The figure, however, could suggest that there were no phones in those years. To circumvent this issue, you can consider to tell James that the values on the x-axis are ‘words’. James does not interpret their value then and just puts them equidistant on the x-axis – as can be seen in the following example.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||
List of figures with bars next to each other: NA, Europese steunpakketten, VWO, VWO, VWO, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland.
Type bar= stacks bars.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||
Parameter bar_stack_index determines the positions of the stacks. By default they are shown at the right hand side. The figure below sets bar_stack_index = 1 and moves the stacks to the left. It also sets a name for the stack and adds it to the legend by with bar_stack_name = "The Americas".
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||
List of figures with stacked bars: Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Verlies van banken na afschrijving 20% van devan GIIPS-landen.
The visualization of many bars in one figure may be a challenge. Opting for a wide figure (style = wide) obviously helps to create more space. In addition one can play with bar_gap_fraction, here set to 0.5 in the figure below so the size of the whitespace between the bars is balanced with the width of the bars. To ensure that the line is not submerged by the bars, the line is highlighted.
The author uses x_scale= 1000 because the x-values where given in thousands of euros and the author wants just euros on the x-axis. Putting x_lab_big_mark_show= y adds a thousands separator so large numbers are easier to read.
|
| ||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||
| ||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
One can group data points. Dependent on the orientation of the plot (turn = y or turn = n), the groups are shown in a different manner.
The following example shows how you can ‘manually’ group data points. Please note the zero that was added to the data (below the figure is a link to the xlsx-file). The zero creates space between the groups. In addition, y-axis, which is now the x-axis because turn = y starts at zero. If you don’t want this number (here: 0) to affect your axis, you can choose a value in between the range of the other values.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||
In the xlsx-file you can add group names in a column preceding your data:
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||
For horizontal grouping, you can use parameter group_spacing if you want to add some extra space between the groups. This parameter also works for vertical grouping but may be less needed there.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||
Another example of horizontal grouping is the following figure. The x_title is shifted lower with x_title_v_shift and used to add a kind of extra footnote refering to the title (using ¹). The legend is shifted higher with legend_y and put on one line with legend_n_per_column to make space for it. In addition x_lab_font_size scales the font size of labels at the x-axis somewhat smaller.
|
|
Relevant parameters:
|
||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||||||
first_col_grouping: bars can be grouped. Doing so, gives bars in the same group a common ‘header’. Put group names in the first column, left of the time series names. Time series that belong to the same group should get the same group name. If both one of the group names and one of the time series names contains at least one character (a non-numeric value), first_col_grouping will be set to y automatically. Otherwise, you can do so by hand. The value is of type ‘bool’.
first_row_grouping: boxes can be grouped, which gives the boxes in the same group the same ‘header’ (and the same color if you want to). Put group names in the first row, above the time series names. If these comprise characters, first_row_grouping will be set to y automatically. The value is of type ‘bool’.
group: names of groups. If given, number of elements should equal number of time series. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): group-1;; group-2;; group-2. See also parameter(s): first_row_grouping, box_col_per_group, name.
group_spacing: extra space between groups. The value is of type ‘numeric’. Example(s): 0, 0.5, 1, 2. For the default style the value is 0. Figure(s) using ‘group_spacing’: VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa.
group_x: the x-positions of the group names. James will set them automatically if not specified by user. Please beware that the group names should be placed at different positions, dependent on the orientation of your plot (i.e., turn = y or turn = n). The value is a list with elements of the type ‘numeric’ separated by ‘,’.
In general, parameter highlight_series will give color highlight_col (default: rose) to that series. I.e., also for non-bar type figures.
The following figure, for example, highlights the second time series.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||
If you use this parameter to highlight a time series of type ‘bar’ (bar-- or bar=), you can choose to limit the highlighting to one bar in particular. The following figure shows how you can do so with parameter highlight_x.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||
Please note that if the ‘highlight color’ is part of your palette, which the default highlight color is, it will be removed from the palette so that only the highlighted time series gets the wanted color.
These parameters enable you to highlight a certain time series or a certain bar of a certain time series.
highlight_series: time series you want to highlight. The value is of type ‘numeric’. Figure(s) using ‘highlight_series’: Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Verlies van banken na afschrijving 20% van devan GIIPS-landen.
highlight_x: if you want to highlight a time series of type ‘bar’, with this parameter you can narrow the highlight to only one given x-position. The x-position specified here, is interpreted as a number (only if all values on the x-axis are numbers) or as a string (if at least one of the values on the x-axis is a string). The value is of type ‘numeric’. Unit: ‘x’. Example(s): bbp. Figure(s) using ‘highlight_x’: Europese steunpakketten.
bar_gap_fraction: how much space you want between the bars of two consecutive x-points, where 0 means no gap, 1 means no bars. The value is of type ‘numeric’. Unit: ‘fraction’. Example(s): 0, 0.1. For the default style the value is 0.2. Figure(s) using ‘bar_gap_fraction’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 .
bar_lab_show: you can show the value of the bar on top of it, or in its middle. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): bar_lab_n_decimals, bar_lab_top, bar_lab_increase_y_lim_2. Figure(s) using ‘bar_lab_show’: kansrijk.
This section shows how you can use James to create a basic histogram of one single vector of data. You can use the following parameters.
hist_freq: if y, the histogram graphic is a representation of frequencies (i.e. counts). If n, probability densities are plotted so that the histogram has a total area of one if you set bar_gap_fraction = 0. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): bar_gap_fraction.
An example of a histogram:
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||
If you want to enrich your histogram with other time series, you should consider the histogram as a special case of a bar plot and manually add its x- and y-values to the data tab. Doing so enables to add other time series to your plot as well.
This section shows how to add dots (more generic: symbols) to your plot. The following parameters help to fine-tune the dots to your needs.
Dots can have different shapes and sizes. Probably, ‘symbol’ would be a more appropriate name for this variable.
dot_shape: there are over 20 symbols you can choose from; they are all shown in one of the figures in the manual. There are two types of alternatives to the shapes. Firstly, you can use ‘.’ (a period) to specify very small dots. Secondly, you can use a single character (e.g. a letter, digit or sign (e.g. a, 1, or %)). The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 19. For the ppower style the value is NA. Figure(s) using ‘dot_shape’: Verlies van banken na afschrijving 20% van devan GIIPS-landen.
dot_size: size of symbol, c.q. dot. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1. Figure(s) using ‘dot_size’: Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.
List of figures with dots: Phones per continent, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.
The following figure has only a few dots so these dots can be big. You can use dot_size to downscale the dots or use dot_shape= . to get really small dots.
|
|
Relevant parameters:
|
||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||
You can use style= ppower to produce standardized purchasing power plots. An example:
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||
The following figure shows the different symbols you can choose from.
As an alternative to the above 23 shapes, you can also use a dot (dot_shape = . or equivalently dot_shape = 46) and letters as symbol shape. Value . is handled specially. It is a rectangle of side 0.01 inch = 0.0254 cm (scaled by dot_size). In addition, if dot_size = 1 (the default), each side is at least one pixel (1/72 inch on the pdf).
The figure below demonstrates dot_shape = 18. The ‘dots’ are highlighted with default color highlight_col = rose. If that color is part of your palette (which it is here!), it will be automatically removed from the palette so that only the highlighted time series gets the desired color.
|
|
Relevant parameters:
|
||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||||||||
The two subsections below describe how to visualize your time series as an area, bandwidth and fan.
Parameter type = area= stacks the time series in your plot as areas, starting at the x-axis; i.e. the y-axis includes y = 0 by default. Parameter area_stack_name enables you to label the stack in the legend. An example of which is shown in the following figure. Please note that by default the area_stack_name is placed last in the legend; i.e. at position 4. To achieve the same vertical order in the legend as in the figure and keeping the area_stack_name last, parameter legend_order = 3, 2, 1, 4.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||
Time series of type area= may have negative values, in which case the area is placed below the x-axis. Please beware, a stacked area is currently not allowed to have both positive and negative values. In other words, a ‘stacked area’ can’t cross the x-axis.
List of figures with stacked areas: Buitenlandse obligaties in handen van Nederlanders .
This subsection describes how you can plot an area without stacking it on another area. A non-stacked area has a bottom and a top. So, you’ll need two series of data to describe one area. These series you can mark with type = area, area, consecutively.
The following figure shows two lines with a confidence interval. The color palette is chosen so it’s clear to which line the interval belongs.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||||||||||||||||
One figure can hold more than one bandwidths:
|
|
Relevant parameters:
|
||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||
A ‘fan plot’ is a special case of bandwidth plot. It always follows one and the same structure: one line, followed by three confidence intervals with fixed colors. Parameter style= fan initializes three parameters. Firstly, parameter palette for colors, secondly parameter type for the time series types conform the CPB style. I.e., first a rose line, followed by three blue intervals with increasing intensities. This figure shows the color palette. You can re-use these colors in the case you want to customize your fan chart. Thirdly, the four items in the legend are put in one and the same column (legend_n_per_column = 4).
|
|
Relevant parameters:
|
||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||
TODO
The default box plot in James shows quantities box_quantiles = 0, 0.25, 0.5, 0.75, 1.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||
The following figure is an example how to adjust the box plot.
|
| ||||||||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
List of box-plot figures: Inkomenseffecten plannen- en belastingstelsel, Kans om in risicogroep te zitten.
box_col_all_equal: if y, all boxes get the same color. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘box_col_all_equal’: Kans om in risicogroep te zitten.
box_median_col: if empty, same color as box. The value is of type ‘string’. Example(s): gray30. Figure(s) using ‘box_median_col’: Kans om in risicogroep te zitten.
box_median_lab_n_decimals: not documented yet. The value is of type ‘numeric’. For the default style the value is 2. Figure(s) using ‘box_median_lab_n_decimals’: Kans om in risicogroep te zitten.
box_median_lab_show: not documented yet. The value is of type ‘bool’. For the default style the value is n. For the box-plot style the value is y. Figure(s) using ‘box_median_lab_show’: Kans om in risicogroep te zitten.
box_median_shape: 0 = line, rest is symbols like in R (try 19 for filled dot). The value is of type ‘numeric’. For the default style the value is 0. Figure(s) using ‘box_median_shape’: Kans om in risicogroep te zitten.
box_quantiles: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is NA. Figure(s) using ‘box_quantiles’: Kans om in risicogroep te zitten.
This section explains how to use whiskers in your figure.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||
Parameter whisker_series indicates to which series the whisker(s) belong. This is important for the following three reasons. First it determines the position of the whisker in the legend. Second for a bar plot this parameter is crucial for the x-position of the whiskers. In the following figure, whisker_series = 2 makes sure that the whisker is shown on top of the second time series (i.e. the right-hand bar). Third, in case of a plot that contains bars with whiskers, James will automatically limit the width of the whiskers to the width of the corresponding bars (manually adaptable by parameter whisker_edge_length), which prevents whiskers to overlap with each other.
The following is an example how multiple whiskers can be put in one plot. The author of the figure manually shifted the first series a little to the left and the second a little to the right. You can inspect the xlsx-file.
|
| ||||||||||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
Whiskers in bar plots:
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||
Parameter whisker_legend_show_n determines the number of whiskers the legend shows - which you may want if different whiskers have different meanings.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||
List of figures with whiskers: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.
whisker_col: color of whiskers. You can supply a different color for each whisker. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘whisker_col’: Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot.
whisker_legend_col: color of whiskers in legend. If no value specified, whiskers will take same color as in figure. The value is of type ‘string’. Figure(s) using ‘whisker_legend_col’: Two series of whiskers in one plot.
whisker_legend_show_n: the number of whiskers you want to show in your legend. If different whiskers for different series have different meanings, you may want to show them all. If you don’t want to see whiskers in your legend, then set whisker_legend_show_n = 0. Please note that you can change the order of the whiskers in your data if needed. The value is of type ‘numeric’. Example(s): 0, 1, 2, …. For the default style the value is 1. Figure(s) using ‘whisker_legend_show_n’: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Two series of whiskers in one plot.
whisker_series: time series which this series corresponds to. The default value is set so that your first whisker definition is superimposed on the first time series (bar–), the second on the second, etc. If, for example, you have a whisker for only one of the time series, you can indicate here which time series that is. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is NA. Figure(s) using ‘whisker_series’: Verwacht verlies in verschillende scenario’s.
You can combine different types in one plot. Parameter name_col colors the line black. Section ‘Colors’ discusses how to use this paramter.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||
James supports maps on two scales: The Netherlands and the world.
This section explains how to create a figure with a geographic map of different regions, each with a given color. A color may be either given directly or be interpolated based on a given value.
The following box provides an overview of the type of regions of The Netherlands you can choose from:
Arbeidsmarktregio, Arrondissementsgebied, Brandweerregio, Buurt, COROP-gebied, COROP-plusgebied, COROP-subgebied, Gemeente, GGD-regio, Grootstedelijke aglomeratie, Jeugdregio, Kamer van Koophandelregio, Landbouwgebied, Landbouwgroep, Landsdeel, NUTS1, NUTS2, NUTS3, Politieregio, Provincie, Regionaalmeld Coordinatiepunt, Regionale Eenheid, RES-regios, Ressort, RPA-gebied, Stadsgewest, Toeristengebied, Toeristengroep, Veiligheidsregio, Veiligthuisregio, Wijk, Zorgkantoorregio.
These items are available for different years. The maps are downloaded on the fly. CBS explains here and here how to work with PDOK maps in R.
The following subsections explain step by step how to start creating your own custom geographic map.
You start with selecting a specifc map from Appendix: CBS Geo-regions and assign that value to parameter geo_cbs_map. Next, with parameter style you indicate that you want to create a map. As last, you set parameter tab to a non-existing data tab. For example, your meta-tab could look as follows.
| parameter | value |
|---|---|
tab |
data |
style |
map |
geo_cbs_map |
arbeidsmarktregio_2020 |
Doing so will result in a map that divides The Netherlands in so-called arbeidsmarktregio’s in the year 2020.
After saving your file, you can run James for the first time. If the tab you refer to does not exist yet (important!), James will create a new tab with the given name, fill it with data (see next step) and create the following figure.
|
|
Relevant parameters:
|
||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||
After running James, you can find the freshly created data tab after closing and re-opening your xlsx file. In the data tab, you’ll find four columns:
region with the region names for the chosen geo_cbs_map
code with the corresponding region codes
region names only if you remove the codes columnvalue with a unique integer for each region
label with numbers 1, 2, … as an example label for each region
To be complete, there is one more column which you can add too (not yet present):
color so you can ‘manually’ set colors
sun to region ZeelandThe figure below equals the figure above, after the following modifications.
palette holds one color more (+rose)geo_col_threshold with values for the colors in the palette (1 = anakiwa, 18.5 = endeavour, 36 = rose); Section ‘Colors’ explains the use of colors in detailname and name_col to specify the legend; Section ‘Legend’ explains in detail how you can further tweak or remove the legendfootnote and a title|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||
Next to region names, it’s also possible and probably preferable to make use of codes to identify regions. The following figure does so. The head of its data tab lists:
| code | value |
|---|---|
| GM1680 | 1 |
| GM0738 | 1 |
| GM0358 | 0 |
| GM0197 | 1 |
| GM0059 | 1 |
| GM0482 | 1 |
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||
The Netherlands is divided in several ways in different regions. You can use these parameters to choose which devision you want to use. You may add items to the legend with parameter name. The items in the legend will be colored in the same order as the colors in your palette. See also parameter(s): name, palette.
geo_cbs_map: this parameter specifies a specific division of The Netherlands in regions. See appendix of manual for the full list of options currently available. The value is of type ‘string’. Example(s): arbeidsmarktregio_2018. Figure(s) using ‘geo_cbs_map’: geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten.
geo_cbs_url_base: first part of url that is used to download geographic data originating from CBS. Please edit the url if you need to. The value is of type ‘string’. For the default style the value is https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?request=GetFeature&service=WFS&version=2.0.0&outputFormat=json&typeName=cbs_.
geo_col_threshold: the order of the values of this parameter correspond to the order of the colors in your palette. Regions with the first (second, third, etc.) value will get the first (second, third, etc.) color from your palette. Regions with other values will be be colored by linear interpolation of the colors in your palette. Regions with values outside the range of this parameter will get the figure’s background color. The values in this parameter must be stricktly increasing. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. See also parameter(s): palette, palette_blue. Figure(s) using ‘geo_col_threshold’: Arbeidsmarktregio’s in 2020 volgens CBS.
The following figure uses style = world-map to show a map of the world with CPB-style colors, added green.
|
| ||||||
|
Relevant parameters: | ||||||
| ||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
Because the figure is in English, it uses style = english too.
You can specify the countries following the ISO 3166-1 standard for either alpha-2 two letter country codes, or alpha-3 three letter country codes. James is not case sensitive here, so you can use both uppercase and lowercase.
The above figure uses the alpha-2 standard, in which, for example, The Netherlands is represented with ‘NL’. This alpha-2 standard is used most prominently for the Internet’s country code top-level domains (with a few exceptions). The alpha-3 standard on the other hand represents The Netherlands with ‘NLD’.
Currently, James uses the R-package
rnaturalearthto represent the world. Unfortunately, this package does not exactly follow the above standards for the following countries: Kosovo (KOS), Palestine (PSX), Somaliland (SOL), South Sudan (SDS), Turkish Republic of Northern Cyprus (CYN) and Western Sahara (SAH). If you need these countries, please use the alpha-3 standard plus the abbreviations shown here.
If you want a more fancy layout of the title, you can use style = world-map-www.
|
| ||||||
|
Relevant parameters: | ||||||
| ||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
This layout also enables you to set a value for the title (parameter world_map_value). The value appears at the right size of the title with the blue background. The background color of the value is automatically adapted based on the thresholds (world_map_threshold) and colors set in the legend. Please note that the palette parameter sets the corresponding colors (parameter palette_world_map holds the default colors). The horizontal size of the blue background of the title scales with its content.
|
| ||||||||
|
Relevant parameters: | ||||||||
| ||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
world_map_projection: maps are flat (2D), while the earth is a sphere (3D). Here you can choose which projection you want to use to project the 3D earth on a 2D flat. https://proj.org/operations/projections/index.html contains an overview. Please use the ‘proj-string’ below the image. See for example the default projection (‘hatano’) which we use: https://proj.org/operations/projections/hatano.html. The value is of type ‘string’. For the world-map style the value is +proj=hatano.
world_map_value: not documented yet. The value is of type ‘numeric’. Figure(s) using ‘world_map_value’: World trade volume change last month:.
James has a parameter style, which enables you to quickly change the layout of your figure. Each style defines a unique combination of settings.
The main styles are:
The default dimensions of a figure are width 7.5 cm by height 7.5 cm. You can change this by setting the style parameter with one of the following values. James will automatically adjust all internal figure margins accordingly.
style = small for a slightly smaller figure. This is the standard for figures in a so-called ‘frame’ (Dutch: ‘kader’).
width: 6.8 cm, height: 6.8 cmstyle = big for figures with a lot of information (e.g. a barplot with many bars and labels on top of them).
width: 15 cm, height: 15 cmstyle = tall for figures that need extra vertical space in your text document.
height: 15.5 cmstyle = slide to fit the dimensions of a PowerPoint slide that has two figures on it.
width: 14.2 cm, height: 11.7 cmstyle = slide-wide to fit as a landscape image on a PowerPoint slide.
width: 21 cm, height: 11.7 cm, margin_south: 2.8 cmstyle = wide for figures that need extra horizontal space in a text document.
width: 15.5 cmIt does not make sense to combine these.
Currently there are two document styles: the default one that is used for a notition, a memo and a background document, and the kansrijk document style.
style = kansrijk the kansrijk style removes the title, has different dimensions and different colors.
style: no-title, width: 12.5 cm, height: 7 cm, bg_col: #ffffff, palette: kansrijkstyle = english if you want numbers to have a dot (.) as decimal separator and a comma (,) for thousands separator. If you use the cpb logo (logo_show = y, explained elsewhere), this style will make sure that the text next to the logo is in English too.
decimal_mark: ., big_mark: ,, legend_forecast_text: prognosis, forecast_text: prognosisThis style combines always with other styles.
style = no-legend if you want to use the (legend) space below the plot for the plot too. The advantage of this style is that it does not affect the dimensions of your plot. If you don’t want to extend the plotting region (e.g. to be consistent with other plots), but don’t want a legend, please use legend_show = n.
x_ticks_length: -0.02, legend_show: n, margin_south: 1.25 cmstyle = no-title if you want a title and want to extend your plot to the (title) space.
margin_north: 0.7 cmstyle = x-top the x-top style creates extra space for an axis at the top of your figure.
title_align: right, y_title_align: right, margin_north_extra: 0.2 cmstyle = y-right the y-right style creates extra space for a secondary y-axis at the right of your plot.
style = fan sets colors and types for standard fans with one line, followed by three bandwidths.
type: line, area, area, area, area, area, area, legend_n_per_column: 4, palette: fanstyle = histogram get_param("style_histogram")style = box-plot for box-plots.
style: no-legend, y_title_v_shift: 0.3 cm, box_gap_fraction: 0.5, box_median_lab_show: y, margin_north: 0.95 cmstyle = map for creating a map of The Netherlands.
legend_y: 1.08 cm, margin_south: 1.5 cm, margin_west: 0.5 cm, margin_north: 0.8 cm, margin_east: 0.5 cm, palette: palette_mapstyle = world-map for creating a map of the world.
style: wide, width: 15.5 cm, height: 8.5 cm, margin_south: 0 cm, margin_west: 0 cm, margin_north: 0.5 cm, margin_east: 0 cm, palette: palette_world_map, world_map_projection: +proj=hatano, world_map_country_border_col: white, world_map_country_border_lwd: 1, world_map_country_no_data_col: gray95, world_map_ocean_col: anakiwa, world_map_ocean_border_col: anakiwa, world_map_threshold: -2.0, -1.5, 0, +1.5, +2.0, world_map_threshold_legend_n_decimals: 1, world_map_legend_font_col: endeavour, world_map_legend_font_size: 1.3, world_map_title_bg_col: endeavour, world_map_title_col: white, world_map_title_font_size: 2.1, world_map_value_n_decimals: 1, world_map_value_symbol: %, world_map_value_font_size: 3, world_map_value_col: white, world_map_legend_dot_size: 0.5, world_map_legend_dot_col: anakiwaOf course, you can combine some styles (not all, because some contradict each other, e.g. the dimensions). The following figure combines style = no-title, no-legend. Some styles are automatically combined with others. For example, box implements no-legend and kansrijk implements no-title.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||
In the above case James will give you a trivial warning:
## WARNING ## While your style includes 'no-title', you have specified a title. This seems contradictionary.
For the record also parameter style = default: the default style you get for free. You don’t have to specify it. It is put as last by default, hence other styles will have priority over it..
empty_fraction_plot: minimal fraction of plot area between outer gridlines and graph. In practice, at least half of this fraction is free above (and below) the graph. [As of 2020-10-14 this functionality is disabled] The value is of type ‘numeric’. Example(s): 0.3. For the default style the value is 0.
height: height of the resulting image. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.5. For the small style the value is 6.8. For the kansrijk style the value is 7. For the big style the value is 15. For the slide style the value is 11.7. For the slide-wide style the value is 11.7. For the tall style the value is 15.5. For the world-map style the value is 8.5. For the world-map-www style the value is 9.
margin_north: margin above plotting area. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 1.524. For the default style the value is 1.3. For the box-plot style the value is 0.95. For the map style the value is 0.8. For the world-map style the value is 0.5. For the world-map-www style the value is 1. For the no-title style the value is 0.7.
margin_south: margin below plotting area. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 1.905. For the default style the value is 2.3. For the slide-wide style the value is 2.8. For the map style the value is 1.5. For the world-map style the value is 0. For the world-map-www style the value is 0. For the no-legend style the value is 1.25. For the interactive style the value is 3.
margin_west_delta: this is added to margin_west. margin_west is dynamically calculated based on actual width of your y_lab‘s, the labels_margin_left and y_lab_margin_right. This is to guarantee identical alignment of all your labels at the left side of the plot. The value is of type ’numeric’. Unit: ‘fraction of width’. For the default style the value is 0. For the interactive style the value is -0.04.
width: width of the resulting image. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.5. For the small style the value is 6.8. For the kansrijk style the value is 12.5. For the big style the value is 15. For the slide style the value is 14.2. For the slide-wide style the value is 21. For the wide style the value is 15.5. For the world-map style the value is 15.5.
Parameter turn with value turn = y (or turn = TRUE) swaps the x- and y-axes of your plot:
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||
Kansrijk figures don’t have a title, are wider, have a white background and use a different color palette for the time series.
|
| ||||||||||||
|
Relevant parameters: | ||||||||||||
| ||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
This manual contains a section specifically on bar-plots that explains in detail how you can create your own custom bar-plot.
For official figures, you may want to add a logo on top. Parameter logo_show= y does so. Text next to the logo is by default Centraal Planbureau and if style = english then the text is CPB Netherlands Bureau forPolicy Analysis.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||
This section discusses the basics which probably enable you to create most of the figures. This section ends with Subsection structure of the xlsx-file, which explains which files are and which files aren’t processed by James. It also explains the details you need if you start creating your own xlsx files. Next, Section ‘Quick customizations’ explains how to further tailor your figures in more detail.
Use open = y (or n) if you (don’t) want your figures to be opened automatically after creation. To speed-up the process, you can temporarily exclude some figures from the generation process by create = n.
Time series often have a known part (usually in the past) and a predicted part (e.g. in the future). You can use parameter forecast_x to indicate from which point on your data is predicted. Parameter forecast_x is defined as the last moment (read: x-value) that is observed/known. Values larger than forecast_x are considered to be forecasted.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||
forecast_col_transparency: forecasted areas/bars have this transparency level. Zero means no transparancy, one means full transparancy. PLEASE REMOVE THIS PARAMETER. NO LONGER USED. WE NOW ‘shade’ BARS/AREAS The value is of type ‘numeric’. Unit: ‘fraction (0..1]’. Example(s): 0.3, 0.5, 0.7. For the default style the value is 0.
line_obs_fc_lty: line types of observed respectively forecasted data. Please use the default settings. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is NA. See also parameter(s): line_lty.
James offers several ways to add help lines and shading to a plot. Parameter x_shading shades part of your figure before the plotting starts, parameter shading_suppress_x applies the shading after the plotting takes place. Therefore, shading_suppress_x enables you to ‘mask’ part of your plot. The first figure demonstrates the use of shading_suppress_x, c.q. shading_suppress_x_date.
|
| ||||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||||
| ||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
The second figure demonstrates the use of x_shading, c.q. x_shading_date.
|
| ||||||||||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
hline_bold: by default the lowest gridline is bold. Except if your plot contains bars and zero is visible, then the default is zero. If you want the bold line(s) to appear at other places, you can specify the(ir) y-value(s) here. The value is of type ‘numeric’. For the ppower style the value is 0. See also parameter(s): hline_bold_show. Figure(s) using ‘hline_bold’: Oversterfte in 2020, VWO, VWO, trend-vs-niveau.
hline_dash: not documented yet. The value is of type ‘numeric’. Figure(s) using ‘hline_dash’: Kans om in risicogroep te zitten, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Two series of whiskers in one plot.
shading_suppress_x: same as x_shading, except that it is ran after most plotting is done so you can suppress parts of plot. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_shading.
shading_suppress_x_date: same as shading_suppress_x, but then with dates instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘,’. See also parameter(s): shading_suppress_x. Figure(s) using ‘shading_suppress_x_date’: Eerste indruk: corona treft ouderen buitenproportioneel.
vline_dash: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘vline_dash’: Oversterfte in 2020, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
vline_dash_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘vline_dash_col’: Oversterfte in 2020.
vline_dash_date: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): 2020-12-31. Figure(s) using ‘vline_dash_date’: Eerste indruk: corona treft ouderen buitenproportioneel, Rentespreads op overheidsschuld.
x_shading: vertical shading (from, to, from, to, etc.). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 2000, 2005, 2010, 2015. See also parameter(s): shading_suppress_x.
x_shading_col: not documented yet. The value is of type ‘string’. For the default style the value is #00000022. Figure(s) using ‘x_shading_col’: Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
x_shading_date: same as x_shading, but then with dates instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘,’. See also parameter(s): x_shading. Figure(s) using ‘x_shading_date’: Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
There are two ways to visualize a formula. First, you can use formula’s in Excel (see Section ‘Data manipulation’ for details). Second, with the parameter formula.
The following figure adds the sinus of the x-values in the example from Section ‘A kick-start example’, multiplied by ten. Please note that the first column in the data parmeter (i.e. p$data[, 1]), holds the x-values. The following column in the data parameter (i.e. p$data[, 2]) holds the first time series (here: (6 - x)^2), the third column (i.e. p$data[, 3]) holds the second time series, and so on.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||
formula: append outcome of formula after last column to data. Please note, your data x-values are in p$data[, 1]. The first series’ values are in p$data[, 2], the second in p$data[, 3] and so on. So, the example determines the mean of the first and second series. The value is of type ‘string’. Example(s): rowMeans(p$data[, 2:3]).
Obviously, James can’t just make any figure you can think of. If you want to go beyond James’ current limits, you may consider to start with a basic figure - so you get the CPB-style for free - and enrich that with custom R-code. The following figure, for example, adds differently sized symbols and a custom legend to the figure. Please beware, the current version of the manual does not correctly show the value of parameter custom here; the $-sign is interpreted wrongly here. As a workaround, please download the xlsx-file via the link below the figure if you want to scrutinize this example in detail.
|
| ||||||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. |
Custom R-code that will be run after James finishes the rest of the plotting.
custom: your parameters are available as p$parameter. You have acces to your data as follows. The x-values are in p$data[, 1]. The first time series is p$data[, 2], the second is p$data[, 3], etc. If you generate figures from R (not Excel), you may define a function ‘custom <- function(p) { … }’ with a custom implementation instead. The value is of type ‘string’. Example(s): lines(p$data[, 1], mean(p$data[, 2:3])). Figure(s) using ‘custom’: Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Older workers more productive?.
You can just add the formats you want as boolean parameters to your meta tab. By default png = y and other formats are put to n by default.
Examples:
gif = y provides an animated figure with data starting at zero and ‘growing’ in gif_n_frames frames (default 20) to their actual values. You can set the delay between the steps with paramter gif_delay (default 0.1 seconds). This setting is described in more detail further on. NB This setting may work but is not regularly checked and not supported.jpg = y provides a jpeg file. This is a compressed file, which may be used to save disk space. The image quality can be controled by quality (default 75). NB This setting may work but is not regularly checked and not supported.pdf = y provides a vector graphics version of your figure (i.e. ‘infinite’ resolution), which may be used in LaTeX or pdf documents.png = y (the default) provides a so-called ‘portable network graphics’ version of your figure. This setting is recommended because png’s are not compressed (and are hence less blurry than jpg’s) and guarantee that their layout (including font) is invariant between different software programs that show them (e.g. Word, pdf, PowerPoint, etc.).svg = y provides a scalable vector graphics version of your figure, which may be used on e.g. websites. Svg is also vector graphics but not displayed in each word processing program. NB This setting may work but is not regularly checked and not supported.So, we recommend using the default png unless you have good reasons to use a different format.
Obviously, you can set the title of your figure with the parameter title. If your title is too broad for your figure, you may add a newline with \n to your title. If your figure is (still) too broad, James will autoscale it smaller to make it fit the margins. Please beware, if this happens, your plot doesn’t comply anymore with the CPB-style.
You may add extra information, e.g. the source, to the figure by inserting a footnote. By default, the footnote is italic black, aligned bottom right. The following figure shows a footnote that is more prominent but visually less attractive.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||
A footnote may refer to a text label (e.g. title) in your figure. In that case, you may want to use a ¹, ², ³, or * in both the text label and the footnote.
footnote: footnote, placed at bottom of figure, aligned right by default. The value is of type ‘string’. Example(s): ¹this is a footnote. Figure(s) using ‘footnote’: Six different line types, Oversterfte in 2020, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Standard normal distribution, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Toeslagen, VMBO, Two series of whiskers in one plot.
footnote_align: to which side you want to align your footnote horizontally. The value is of type ‘string’. Example(s): left, center, right. For the default style the value is right. Figure(s) using ‘footnote_align’: Toeslagen.
footnote_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘footnote_col’: Six different line types, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Toeslagen, VMBO.
footnote_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3. Figure(s) using ‘footnote_font_style’: Toeslagen.
footnote_side: to which side you want to align your footnote vertically. The value is of type ‘string’. Example(s): bottom, top. For the default style the value is bottom. Figure(s) using ‘footnote_side’: Toeslagen.
The figure below is an example how you can add a text label if your x-axis is of type ‘date’. Please see Section ‘Axes’ for details on dates on axes.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||
If your x-axis comprises dates, you should use text_x_date instead of text_x as in the following figure. Please see the subsection on parameters for datails.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||
text_col: the color of the label. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): black, rose, green. For the default style the value is black. Figure(s) using ‘text_col’: Oversterfte in 2020, Industriële productie en detailhandel, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
text_font_size: relative font size. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0.7, 1.5. For the default style the value is 1. Figure(s) using ‘text_font_size’: Industriële productie en detailhandel.
text_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 2, 3, 4. For the default style the value is 3. Figure(s) using ‘text_font_style’: Older workers more productive?.
text_label: the text label you want to show in the figure. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): first label;; second label. Figure(s) using ‘text_label’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Rentespreads op overheidsschuld, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
text_offset: distance (‘offset’) of the text label from the specified coordinate in fractions of the width of the letter ‘m’. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 0.5. Figure(s) using ‘text_offset’: Different alignment for PT.
text_pos: alignment of your text label. Leave empty if you want your text centerd on the given (x,y) coordinates. Or: 1 = below, 2 = left, 3 = above, 4 = right. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 2, 3, 4. Figure(s) using ‘text_pos’: Oversterfte in 2020, Older workers more productive?, Rentespreads op overheidsschuld.
text_rotation: the rotation of the label in degrees counterclockwise. Zero (0) means horizontal, 90 means vertical. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 45, 90. For the default style the value is 0. Figure(s) using ‘text_rotation’: Industriële productie en detailhandel, Impact no-deal Brexit (horizontal).
text_x: the x-position of your text label. If your x-axis is numeric, just put the value here. If you use bars, then text_x works as follows. The x-value of the first x-position is 1, i.e. where the first (set of) bars are located. The second is 2, etc. So, if you want your label inbetween the first two x-position, you should use 1.5 as a value. If your x-axis holds dates, please use text_x_date instead. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘text_x’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
text_x_date: if your x-axis consists of dates, you should use this parameter instead of text_x, to indicate what the x-postion of your text label is. Please mark the cell in Excel as a ‘date’ (i.e. not as a regular number). The value is a list with elements of the type ‘Date’ separated by ‘,’. Example(s): 2020-03-18. Figure(s) using ‘text_x_date’: Rentespreads op overheidsschuld.
text_y: the y-postion of your text label. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘text_y’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Rentespreads op overheidsschuld, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
TODO HIER ANDERE VARS TOEVOEGEN VOOR MEER CONTROLE
label_font_size: relative to font size of title. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1. Figure(s) using ‘label_font_size’: Overlapping labels (NL, PT), Different alignment for PT.
The following figure illustrates how one can create a parameter from one of the columns in the data tab. Parameter label_series_n (is not set here, and hence defaults to 1) determines the positions of the labels in the figure. The default aligment is label_align = 4 below the position. As you can see, the labels PT and NL overlap.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||||||||||
The following figure fixes the overlap by adding parameter label_align to the data tab and sets a specific value of 1 (meaning: align below) to label PT. In addition the space between the labels and the dots is reduced with text_offset = 0.25.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||||||||||||||
Section ‘The data tabs’ explains in detail how and when to use the data tab to set or create parameters that can be used in the plotting.
This section explains how to tweak your axes. It starts with a figure that uses parameters x_axis_show and y_axis_show to hide both axes.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||
Please note that the figure above uses long dashes (line_lty= 2), while the adviced default is short dashes (line_lty= 3).
To do: Text on the numbers, dates, precision, ook dec separator, x_lim_follow_data
For aesthetic reasons, by default the lowest gridline is made bold. However, in if your figure has bars (bar-- or bar=) or stacked areas (area=), by default the gridline at y = 0 is made bold. You can manually choose to boldify another gridline by setting hline_bold to another y-value or if you don’t want any bold gridline at all, you can set hline_bold_show= n.
It is easy to adapt the layout of the axes (decimal separerator, etc.) when switching between languages with style = english (default style is Dutch). See also parameter(s): style.
force_y_at: normally James adds whitespace around the graph (see parameter empty_fraction_plot). You can force James to put the gridlines at precisely y_at (value: y). Otherwise (value: n) James will add extra gridlines if necessary. The value is of type ‘bool’. For the default style the value is n.
x_at: position at which you want labels at the x-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘x_at’: Two series of whiskers in one plot.
x_axis_show: use n if you want to hide x_lab and x_ticks. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): x_lab, x_ticks, y_axis_show. Figure(s) using ‘x_axis_show’: Six different line types, trend-vs-niveau.
x_lab_big_mark_show: for the values at the x-axis, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. Figure(s) using ‘x_lab_big_mark_show’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Toeslagen.
x_lab_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘x_lab_col’: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
x_lab_date_show: if y, dates are shown instead of numbers (n). The value is of type ‘bool’. Example(s): y, n. Figure(s) using ‘x_lab_date_show’: Economische groei in Nederland.
x_lab_font_size: relative font size of the labels on the x-axis. The value is of type ‘numeric’. For the default style the value is 1. Figure(s) using ‘x_lab_font_size’: Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa.
x_lab_rotation: rotate the labels at the x-axis. Zero (0) for horizontal. 90 for vertical. The value is of type ‘numeric’. Unit: ‘degrees’. Example(s): 0, 45, 90. For the default style the value is 0. Figure(s) using ‘x_lab_rotation’: Impact no-deal Brexit (horizontal).
x_lim: restrict the range of the x-axis to this limit. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. Figure(s) using ‘x_lim’: Ontwikkeling EMU-schuld in schokscenario’s, Oversterfte in 2020, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, Two series of whiskers in one plot.
x_lim_follow_data: not documented yet. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘x_lim_follow_data’: Six different line types, Industriële productie en detailhandel, Buitenlandse obligaties in handen van Nederlanders , Werkverliezers.
x_n_decimals: number of digits right of decimal separator on x-axis. If you don’t provide a number, the number of digits will be automatically determined based on the values on the axis. The larger interval the values these span, the less digits shown. The value is of type ‘numeric’. Example(s): 1, 2.
x_ticks: overrule the default ticks at the x-axis. Leave empty for default (x_at). NB this parameter is used only if x_ticks_date is not given. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1990, 1995, 1997, 2000. Figure(s) using ‘x_ticks’: VWO, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
x_ticks_date: choose one or more if you want ticks at these places. Beware, the default ticks will not be shown now (set x_ticks_show = y if you want them too). The value is a list with elements of the type ‘string’ separated by ‘,’. Unit: ‘unit of time’. Example(s): years, quarters, months, weeks, days. Figure(s) using ‘x_ticks_date’: Economische groei in Nederland.
y_at: position at which you want labels at the y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 20, 40, 60, 80, 100. Figure(s) using ‘y_at’: ppower, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Impact no-deal Brexit (horizontal).
y_axis_show: use n if you want to hide y_lab. Contrary to the x-axis, the y-axis does not have ticks. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): y_lab, x_axis_show. Figure(s) using ‘y_axis_show’: trend-vs-niveau.
y_lab: the labels you want at that the positions y_at at your left y-axis. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): y_lab_col, y_r_lab. Figure(s) using ‘y_lab’: Six different line types, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
y_lab_col: color of labels at left y-axis. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. See also parameter(s): y_lab. Figure(s) using ‘y_lab_col’: Impact no-deal Brexit (horizontal).
y_lim: same as x_lim, but for left y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘y_lim’: A discontinuity.
y_n_decimals: number of digits right of decimal separator on y-axis. The value is of type ‘numeric’. Example(s): 1, 2. See also parameter(s): y_r_n_decimals, x_n_decimals.
y_r_n_decimals: number of digits right of decimal separator on right y-axis. The value is of type ‘numeric’. Example(s): 1, 2. See also parameter(s): y_n_decimals, x_n_decimals.
By default, all time series are mapped to the left y-axis. One needs a secondary y-axis for one or more of the time series, one can use parameter y_axis = l, l, r (see y_axis) to indicate which time series should be mapped to the secondary y-axis, respectively.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||
The following parameters may be used for a secondary y-axis. You may set custom values or let James determine which values might fit in. Please set parameter turn = y, if you want so, after filling all the other settings. Meaning, the secondary y-axis is called y-axis, even though it may be an x-axis after turn = y.
y_axis: indicates for each of the respective time series whether they are projected on the left (l) y-axis or on the right (r) y-axis. If one or more series are on the right axis, style ‘y-right’ or ‘x-top’ (if ‘turn = y’) are automatically added as a style. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): l, l, l, r, r. For the default style the value is l. See also parameter(s): style, turn. Figure(s) using ‘y_axis’: Verlies van banken na afschrijving 20% van devan GIIPS-landen, Economische groei in Nederland.
y_r_lab: the labels you want at the right y-axis. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): y_r_lab, y_r_lab_col. Figure(s) using ‘y_r_lab’: Six different line types, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
y_r_lab_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘y_r_lab_col’: Impact no-deal Brexit (tall).
By exception it may happen however, that one only wants to map a fraction of the figure on the secondary y-axis. The following figure illustrates how to do so for a particular case where the impact of a no-deal Brexit is shown per country. The impact of one of the countries is shown at the secondary y-axis. Please note that the data of this single country was scaled by hand (i.e. divided by five) and that the labels at the secondary y-axis were placed by hand too. Because turn = y, the secondary y-axis becomes the x-axis at the top of the figure.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||||||||||||||||||||
The following figure shows the exact same data, without swapping the x- and y-axis (i.e. turn = n). This keeps the countries on the x-axis.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||||||||||||||||||||||||||||||||
Legend position and content can be tweaked in many ways.
legend_forecast_show: added shaded block with dashed line to legend if forecast_x is set. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): forecast_x.
legend_n_per_column: number of time series names per column in legend. The value is of type ‘numeric’. Example(s): 1, 4. For the default style the value is 3. For the fan style the value is 4. For the ppower style the value is 4. Figure(s) using ‘legend_n_per_column’: Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Impact no-deal Brexit (horizontal), VMBO, Verwacht verlies in verschillende scenario’s.
legend_order: use this to shuffle order or make selection (example shows only series 1, 3 and 5). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 3, 5. Figure(s) using ‘legend_order’: Buitenlandse obligaties in handen van Nederlanders , Participatie gemeenten, Two series of whiskers in one plot.
legend_symbol_height: not documented yet. The value is of type ‘numeric’. Unit: ‘fraction of legend_line_distance’. For the default style the value is 0.8. See also parameter(s): legend_line_distance.
legend_y: position of top of legend, seen from bottom of figure. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 0.12. For the default style the value is 1.3. For the map style the value is 1.08. Figure(s) using ‘legend_y’: VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Impact no-deal Brexit (horizontal).
name: names of the individual time series. These overwrite the series names in the headers of the data sheet and thus also in the legend. Beware: use ;; as separator between names. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): bbp;; inflation;; interest. Figure(s) using ‘name’: Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten.
James makes it easy to color your time series by putting nice combinations of colors in a so-called palette. You set the palette with parameter palette. The default is palette = auto. Please note, auto is not a palette. auto will be replaced by either cpb_3 if there are less than four time series or by cpb if there are more time series. An alternative is palette = kansrijk so that the kansrijk colors are used (see below for its colors). Might you run out of colors in one palette, you can easily join different palettes, e.g. by palette = cpb, appletv, which concatenates these two palettes. Subsection Customization of colors and palettes shows an example that customizes colors. Subsection Parameters to tweak your colors describes the use of palette in more detail. Below you’ll find the appletv and other carefully composed palettes.
yarrr pacakge. Kudos for the yarrr package!
James gives each color a name. You can admire a specific palette and get the names of its colors as follows in R.
show_col_pals("cpb", TRUE)
Fan charts are a special case of the bandwidth plots. If style is set to fan, James will use the below fan palette.
The use of a color palette makes it straighforward to customize the colors in your figure. You can manually set parameter palette to a combination of palettes and separate colors as defined above. The figure below combines three separate colors (red, blue, white) with a palette (appletv).
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||||
For colors James uses the hex triplet coding. For example, red = #FF0000. You can use both color names for which a color is defined as hex triplets to indicate which colors you want to use.
col_order: change color order. You may reuse colors as is show in the example. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 3, 1, 1, 2, 2. Figure(s) using ‘col_order’: Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
color: holds the resulting colors in the same order as they are needed during the plotting phase. If you don’t specify its values, the variable will be automatically set during the pre-processing phase based on palette, highlighting, etc. The value is a list with elements of the type ‘string’ separated by ‘,’.
name_col: this way you can assign specific colors to specific time series, to ensure each series has one color in different figures. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): bbp = blue;; inflation = yellow;; interest = pink. Figure(s) using ‘name_col’: Groeibijdragen bestedingen, Arbeidsmarktregio’s in 2020 volgens CBS.
You are free to use functions and algebra in your xlsx-file. James will use the result of that. So, if you would put = 1 + 1 in a cell, Excel will show you the anser (2), which will be used by James, too.
Next, there are several ways (c.q. parameters) to manipulate your data after you save them in your xlsx-file but before you create the figure:
Data operations, executed in the order: order(_name), scale, keep, transformation.
order: select subset of time series you want to plot. You can also change the order (see example). Please note: the ordering is the very first action (before scaling). It’s the same as re-ordering the columns in your data tab, yourself. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 4, 2. Figure(s) using ‘order’: Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
scale: scale your data. You may use this for example to scale fractions to percentages (scale = 100). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 100. For the default style the value is 1. For the ppower style the value is 100. Figure(s) using ‘scale’: Buitenlandse obligaties in handen van Nederlanders , kansrijk, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Verlies van banken na afschrijving 20% van devan GIIPS-landen.
transformation: this transformation function will be applied to each y-value individually. The value is of type ‘string’. Example(s): log, function(x) x^2. Figure(s) using ‘transformation’: Werkverliezers.
x_keep: remove data outside of this range. Keep data inside range. The example removes all data below 0 and above 100. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. Figure(s) using ‘x_keep’: ppower.
x_scale: scales the x-axis. The value is of type ‘numeric’. Example(s): 0.001, 100. For the default style the value is 1. For the ppower style the value is 0.001. Figure(s) using ‘x_scale’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 .
y_keep: see x_keep. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘y_keep’: ppower.
Please beware of the order in which the data manipulations are performed.
The first step and most straightforward one is order, which you can use to re-order your columns before anything else happens. For example, if you would have a data set with only two time series, order = 2, 1 will have the same effect as swapping the corresponding two columns in the xlsx-file.
The second step uses parameters x_raw_keep and y_raw_keep to indicate which raw data you want to keep and discard. The advantage of removing data early in the process (here: before scaling), may save computational time and thereby speed-up the process.
The second step in the data manipulation phase is the scaling of your data. For example, scale = 100 may be used to convert fractions into percentages. If you supply only one value here, that value will be applied to each series. However, you may also choose to scale different series with different values. For example, if you have two time series and scale = 100, 1, the first one will be multiplied by 100.
Third step: similarly to scaling your y-values, with x_scale you can scale the values on your x-axis. Please see this figure for an example.
The fourth step uses parameters x_keep and y_keep to indicate which data you want to keep after the scaling has taken place. Data outside these ranges is discarded.
The fifth and last step in the data manipulation phase is a transformation with custom R-code. You can put your own custom transformation function there, but you can also use R’s built-in-functions such as log in the next figure. Please note that data are first scaled and then transformed.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||
The parameter x_lim_follow_data = y (see x_lim_follow_data) makes the x-axis zoom-in to the max so you don’t have white spaces left and right. This parameter will be discussed in more detail in the section about axes.
James only processes xlsx files that have a tab called meta. Other files, i.e. .xls, .csv files, or xlsx files that don’t have a meta tab, are ignored.
The meta tab defines your figures. The first column contains the parameters (e.g. for a title). Each following column defines a different figure with parameter values specific for that figure. An example of a frequently used parameter is:
tab: tab name of the tab holding the data for the figure. One figure may refer to multipe tabs, in which case the data will be joined. Multiple figures may refer to the same tab to ‘get their data’, e.g. if you want to make the same figure in different languages. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): tab1; tab1, tab2. Figure(s) using ‘tab’: Hello World, Werkloosheid, Ontwikkeling EMU-schuld in schokscenario’s, Six different line types, Industriële productie en detailhandel, Buitenlandse obligaties in handen van Nederlanders , Two bandwiths in one plot, Oversterfte in 2020, Inflatie, Inkomenseffecten plannen- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Bestaande koopwoningen, Werkverliezers, A discontinuity, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Standard normal distribution, geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, Phones per continent, ppower, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Industriële productie en detailhandel, Older workers more productive?, Toeslagen, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, trend-vs-niveau, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland.
You may add a tab called global. Parameters defined in this tab are assigned to each of the figures in the meta tab, unless overwritten there.
There are two different ways to refer to a data set for your figure. One of them is via the parameter tab in your meta tab. The other way is to refer to a data set via a CBS link (discussed in the next subsection). The value of the parameter tab should equal the name of one or more of the tabs in your xlsx file and hold your data. Such a ‘data tab’ can have different forms. The most straightforward form is x-values in the first column, and time series in the following columns. Each time series should have a header (i.e. a name) defined in the first row of the tab.
In case of bar plot.
James assumes that the first row in the data tab contains the time series names. If, however, the second row contains characters (i.e. not all are numbers), however, James assumes you want to group the series. Please note: you can force the grouping with parameter first_row_grouping = y (see: first_row_grouping) or disable it with first_row_grouping = n. Below you’ll find examples of the grouping.
TODO Explain how that works. Section ‘Text label’ illustrates an example.
# Plot CBS-data in the CBP-style, using just a link In some cases, James can plot data straight from a cbs url. Don’t use the url in the url-bar for that, but click on the ‘export’ or ‘share’ button to find the data url, which you can feed to James.
In this case, the author has constructed a table with sold house prices in The Netherlands and in ’s-Gravenhage, a municipality.
|
This way, your figure is always up-to-date at the moment you create it. |
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||
This functionality is under development. It may thus be that it does not work exactly as expected. Please <contact the author> if you don’t succeed.
If you refer both to a CBS-url and to a data tab, James will combine the two data sets. For example:
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and this batch file to a personal directory and start the batch file. You can also run this R-script in R. | |||||||||||
James puts your own data set first. To make this figure best comparable to the previous, we’ve changed the order of the time series with parameter order = 2, 3, 1 so the added bbp series comes third. More about the parameter order in Section ‘Data manipulation’.
In this case, the added data (‘\(\Delta\)bbp (%)’) has a different unit and should be shown on another y-axis. The section on how to customize your axes explains in detail how to do so.
James can put your figures in a report, which enables you to have a quick overview and easily share them with colleagues. Next to your figures, you can add a new column and set type = report there. That’s all.
Report with only one fig.
This report is what you get out-of-the-box if you run this xlsx-file (cf. ‘kMEV2021’ or ‘juniraming 2020’).
report_include_james_appendix: not documented yet. The value is of type ‘bool’. For the default style the value is y. Figure(s) using ‘report_include_james_appendix’: report.
report_text: you can put your report (R-markdown) text here directly. If you need more space, you can put your text in a sheet and refer to that sheet with parameter tab. The last option is to put your text in a separate file using parameter report_text_file. The value is of type ‘string’. See also parameter(s): tab, report_text_file.
report_text_file: path to the Rmd-file in which you have put the custom r-markdown text for your report (with or without yaml-header). The value is of type ‘file’. Figure(s) using ‘report_text_file’: report.
Building the manual involves creating its figures too. Therefore, the building of the manual is a comprehensive test by itself.
The value of a James-parameter may depend on the style(s) you set. You can find these parameter/style combinations in M:/p_james/dev/dev-2021-01-08/ext/james-base-settings.xlsx (available as variable globals if you run the R-code). You can overwrite a parameter value in both the globals tab and the meta tab of your Excel file.
Based on the parameters, James creates the figures as follows. First a series of pre-processing functions are executed. You can easily add new functions (see parameter preprocess_order) and/or override these functions: (1) add_style, (2) preprocess_data_grouping_variables, (3) j_validate, (4) append_formula, (5) data_operations, (6) preprocess_first, (7) replicate_params, (8) forecast_pre, (9) label_pre, (10) area_stack_pre, (11) hist_pre, (12) bars_pre, (13) whisker_pre, (14) box_pre, (15) dot_pre, (16) linez_pre, (17) area_pre, (18) color_pre, (19) legend_pre, (20) set_lims, (21) set_labs, (22) find_y_r_scaling, (23) logo_pre, (24) set_file_name.
Next, the process functions are executed (see parameter plot_order): (1) format_labs_set_margin_west, (2) set_layout_and_init_plot, (3) set_line_distance, (4) forecast_bg, (5) shading, (6) rectangle, (7) axes, (8) gridlines, (9) area_stack, (10) area, (11) bars, (12) jbox, (13) dot, (14) linez, (15) whisker, (16) label, (17) shading_suppress, (18) custom, (19) bold_axis, (20) user_line, (21) text_label, (22) forecast, (23) margins_0000, (24) j_legend, (25) titles, (26) footnote, (27) logo.
If you want to further improve or extend James, you can update these functions by overriding them in R or add novel functionlity in an R script and adapting the preprocess_order and plot_order lists accordingly.
Note to the developer: you can use get_param_settings_not_in_any_R_file() to get a list of parameters that are defined, but seem not used in any R-script nor code snippet.
Please find
M:/p_james/dev/dev-2021-01-08/*.htmlM:/p_james/dev/dev-2021-01-08/M:/p_james/dev/dev-2021-01-08/examples/xlsx
M:/p_james/dev/dev-2021-01-08/examples/R
M:/p_james/dev/dev-2021-01-08/R/
M:/p_james/dev/dev-2021-01-08/ext/img/
M:/p_james/dev/dev-2021-01-08/ext/misc/
M:/p_james/dev/dev-2021-01-08/ext/report/
M:/p_james/dev/dev-2021-01-08/ext/snippet/
M:/p_james/dev/dev-2021-01-08/ext/style/
James (version dev-2021-01-08) built this manual at 2021-01-08 14:20:59. This took 2.9 seconds. The current version of James counts 500 parameters.
Please add your feature requests or bug report here: https://tinyurl.com/james-feature-request, and <contact the author> afterwards, so it’s easy to
In general, the advice is to work in small steps; e.g. changing one or two parameters at a time. This helps to isolate a potential problem. However, if you think you’ve found a bug, you indeed most likely did so. In which case, please first check whether there is a new version available in M:/p_james/dev. If not, then please put a copy of your xlsx-file in M:/p_jamesgebruiker/q/$usr$ (please replace $usr$ with your own user name) and e-mail your bug report to m.dijkstra@cpb.nl. Thanks!
On April 19, 2017, our King, Willem Alexander van Oranje-Nassau, officially opened our new building B30. That day, prof.dr. Bas Haring was one of the invited speaker. He encouraged us to present our results in terms of stories/parables. His idea inspired the author to frame the discussed software as a person called ‘James’. A personal servant ‘James’ for each of our colleagues!
Meinou de Vries created James’ logo. Many early users exposed bugs in the software. Kudos to all of you!
This section lists all geo-regions you can choose from:
arbeidsmarktregio_2014, arbeidsmarktregio_2015, arbeidsmarktregio_2016, arbeidsmarktregio_2017, arbeidsmarktregio_2018, arbeidsmarktregio_2019, arbeidsmarktregio_2020, arrondissementsgebied_1995, arrondissementsgebied_1996, arrondissementsgebied_1997, arrondissementsgebied_1998, arrondissementsgebied_1999, arrondissementsgebied_2000, arrondissementsgebied_2001, arrondissementsgebied_2002, arrondissementsgebied_2003, arrondissementsgebied_2004, arrondissementsgebied_2005, arrondissementsgebied_2006, arrondissementsgebied_2007, arrondissementsgebied_2008, arrondissementsgebied_2009, arrondissementsgebied_2010, arrondissementsgebied_2011, arrondissementsgebied_2012, arrondissementsgebied_2013, arrondissementsgebied_2014, arrondissementsgebied_2015, arrondissementsgebied_2016, arrondissementsgebied_2017, arrondissementsgebied_2018, arrondissementsgebied_2019, arrondissementsgebied_2020, brandweerregio_1995, brandweerregio_1996, brandweerregio_1997, brandweerregio_1998, brandweerregio_1999, brandweerregio_2000, brandweerregio_2001, brandweerregio_2002, brandweerregio_2003, brandweerregio_2004, brandweerregio_2005, brandweerregio_2006, brandweerregio_2007, brandweerregio_2008, brandweerregio_2009, brandweerregio_2010, buurt_1995, buurt_1996, buurt_1997, buurt_1998, buurt_1999, buurt_2000, buurt_2001, buurt_2002, buurt_2003, buurt_2004, buurt_2005, buurt_2006, buurt_2007, buurt_2008, buurt_2009, buurt_2010, buurt_2011, buurt_2012, buurt_2013, buurt_2014, buurt_2015, buurt_2016, buurt_2017, buurt_2018, buurt_2019, buurt_2019_niet, buurt_2020, buurt_2020_niet, coropgebied_1995, coropgebied_1996, coropgebied_1997, coropgebied_1998, coropgebied_1999, coropgebied_2000, coropgebied_2001, coropgebied_2002, coropgebied_2003, coropgebied_2004, coropgebied_2005, coropgebied_2006, coropgebied_2007, coropgebied_2008, coropgebied_2009, coropgebied_2010, coropgebied_2011, coropgebied_2012, coropgebied_2013, coropgebied_2014, coropgebied_2015, coropgebied_2016, coropgebied_2017, coropgebied_2018, coropgebied_2019, coropgebied_2020, coropplusgebied_2005, coropplusgebied_2006, coropplusgebied_2007, coropplusgebied_2008, coropplusgebied_2009, coropplusgebied_2010, coropplusgebied_2011, coropplusgebied_2012, coropplusgebied_2013, coropplusgebied_2014, coropplusgebied_2015, coropplusgebied_2016, coropplusgebied_2017, coropplusgebied_2018, coropplusgebied_2019, coropplusgebied_2020, coropsubgebied_1995, coropsubgebied_1996, coropsubgebied_1997, coropsubgebied_1998, coropsubgebied_1999, coropsubgebied_2000, coropsubgebied_2001, coropsubgebied_2002, coropsubgebied_2003, coropsubgebied_2004, coropsubgebied_2005, coropsubgebied_2006, coropsubgebied_2007, coropsubgebied_2008, coropsubgebied_2009, coropsubgebied_2010, coropsubgebied_2011, coropsubgebied_2012, coropsubgebied_2013, coropsubgebied_2014, coropsubgebied_2015, coropsubgebied_2016, coropsubgebied_2017, coropsubgebied_2018, coropsubgebied_2019, coropsubgebied_2020, gemeente_1995, gemeente_1996, gemeente_1997, gemeente_1998, gemeente_1999, gemeente_2000, gemeente_2001, gemeente_2002, gemeente_2003, gemeente_2004, gemeente_2005, gemeente_2006, gemeente_2007, gemeente_2008, gemeente_2009, gemeente_2010, gemeente_2011, gemeente_2012, gemeente_2013, gemeente_2014, gemeente_2015, gemeente_2016, gemeente_2017, gemeente_2018, gemeente_2019, gemeente_2019_niet, gemeente_2020, gemeente_2020_niet, ggdregio_1995, ggdregio_1996, ggdregio_1997, ggdregio_1998, ggdregio_1999, ggdregio_2000, ggdregio_2001, ggdregio_2003, ggdregio_2004, ggdregio_2005, ggdregio_2006, ggdregio_2007, ggdregio_2008, ggdregio_2009, ggdregio_2010, ggdregio_2011, ggdregio_2012, ggdregio_2013, ggdregio_2014, ggdregio_2015, ggdregio_2016, ggdregio_2017, ggdregio_2018, ggdregio_2019, ggdregio_2020, grootstedelijke_agglomeratie_2000, grootstedelijke_agglomeratie_2001, grootstedelijke_agglomeratie_2002, grootstedelijke_agglomeratie_2003, grootstedelijke_agglomeratie_2004, grootstedelijke_agglomeratie_2005, grootstedelijke_agglomeratie_2006, grootstedelijke_agglomeratie_2007, grootstedelijke_agglomeratie_2008, grootstedelijke_agglomeratie_2009, grootstedelijke_agglomeratie_2010, grootstedelijke_agglomeratie_2011, grootstedelijke_agglomeratie_2012, grootstedelijke_agglomeratie_2013, grootstedelijke_agglomeratie_2014, grootstedelijke_agglomeratie_2015, jeugdregio_2015, jeugdregio_2016, jeugdregio_2017, jeugdregio_2018, jeugdregio_2019, jeugdregio_2020, kamervankoophandelregio_2008, kamervankoophandelregio_2009, kamervankoophandelregio_2010, kamervankoophandelregio_2011, kamervankoophandelregio_2012, kamervankoophandelregio_2013, kamervankoophandelregio_2014, kamervankoophandelregio_2015, kamervankoophandelregio_2016, kamervankoophandelregio_2017, kamervankoophandelregio_2018, kamervankoophandelregio_2019, kamervankoophandelregio_2020, landbouwgebied_1995, landbouwgebied_1996, landbouwgebied_1997, landbouwgebied_1998, landbouwgebied_1999, landbouwgebied_2000, landbouwgebied_2001, landbouwgebied_2002, landbouwgebied_2003, landbouwgebied_2004, landbouwgebied_2005, landbouwgebied_2006, landbouwgebied_2007, landbouwgebied_2008, landbouwgebied_2009, landbouwgebied_2010, landbouwgebied_2011, landbouwgebied_2012, landbouwgebied_2013, landbouwgebied_2014, landbouwgebied_2015, landbouwgebied_2016, landbouwgebied_2017, landbouwgebied_2018, landbouwgebied_2019, landbouwgebied_2020, landbouwgroep_1995, landbouwgroep_1996, landbouwgroep_1997, landbouwgroep_1998, landbouwgroep_1999, landbouwgroep_2000, landbouwgroep_2001, landbouwgroep_2002, landbouwgroep_2003, landbouwgroep_2004, landbouwgroep_2005, landbouwgroep_2006, landbouwgroep_2007, landbouwgroep_2008, landbouwgroep_2009, landbouwgroep_2010, landbouwgroep_2011, landbouwgroep_2012, landbouwgroep_2013, landbouwgroep_2014, landbouwgroep_2015, landbouwgroep_2016, landbouwgroep_2017, landbouwgroep_2018, landbouwgroep_2019, landbouwgroep_2020, landsdeel_1995, landsdeel_1996, landsdeel_1997, landsdeel_1998, landsdeel_1999, landsdeel_2000, landsdeel_2001, landsdeel_2002, landsdeel_2003, landsdeel_2004, landsdeel_2005, landsdeel_2006, landsdeel_2007, landsdeel_2008, landsdeel_2009, landsdeel_2010, landsdeel_2011, landsdeel_2012, landsdeel_2013, landsdeel_2014, landsdeel_2015, landsdeel_2016, landsdeel_2017, landsdeel_2018, landsdeel_2019, landsdeel_2020, nuts1_2003, nuts1_2006, nuts1_2010, nuts1_2013, nuts1_2016, nuts2_2003, nuts2_2006, nuts2_2010, nuts2_2013, nuts2_2016, nuts3_2003, nuts3_2006, nuts3_2010, nuts3_2013, nuts3_2016, politieregio_1995, politieregio_1996, politieregio_1997, politieregio_1998, politieregio_1999, politieregio_2000, politieregio_2001, politieregio_2002, politieregio_2003, politieregio_2004, politieregio_2005, politieregio_2006, politieregio_2007, politieregio_2008, politieregio_2009, politieregio_2010, politieregio_2011, politieregio_2012, politieregio_2013, provincie_1995, provincie_1996, provincie_1997, provincie_1998, provincie_1999, provincie_2000, provincie_2001, provincie_2002, provincie_2003, provincie_2004, provincie_2005, provincie_2006, provincie_2007, provincie_2008, provincie_2009, provincie_2010, provincie_2011, provincie_2012, provincie_2013, provincie_2014, provincie_2015, provincie_2016, provincie_2017, provincie_2018, provincie_2019, provincie_2020, regionaalmeld_coordinatiepunt_2017, regionaalmeld_coordinatiepunt_2018, regionaalmeld_coordinatiepunt_2019, regionaalmeld_coordinatiepunt_2020, regionale_eenheid_2014, regionale_eenheid_2015, regionale_eenheid_2016, regionale_eenheid_2017, regionale_eenheid_2018, regionale_eenheid_2019, regionale_eenheid_2020, regionale_energiestrategie_2018, regionale_energiestrategie_2019, regionale_energiestrategie_2020, regioplus_arbeidsmarktregio_2015, regioplus_arbeidsmarktregio_2016, regioplus_arbeidsmarktregio_2017, regioplus_arbeidsmarktregio_2018, regioplus_arbeidsmarktregio_2019, regioplus_arbeidsmarktregio_2020, ressort_2015, ressort_2016, ressort_2017, ressort_2018, ressort_2019, ressort_2020, rpagebied_2002, rpagebied_2003, rpagebied_2004, rpagebied_2005, rpagebied_2006, rpagebied_2007, rpagebied_2008, rpagebied_2009, rpagebied_2010, rpagebied_2011, rpagebied_2012, rpagebied_2013, rpagebied_2014, rpagebied_2015, rpagebied_2016, stadsgewest_2000, stadsgewest_2001, stadsgewest_2002, stadsgewest_2003, stadsgewest_2004, stadsgewest_2005, stadsgewest_2006, stadsgewest_2007, stadsgewest_2008, stadsgewest_2009, stadsgewest_2010, stadsgewest_2011, stadsgewest_2012, stadsgewest_2013, stadsgewest_2014, stadsgewest_2015, toeristengebied_1995, toeristengebied_1996, toeristengebied_1997, toeristengebied_1998, toeristengebied_1999, toeristengebied_2000, toeristengebied_2001, toeristengebied_2002, toeristengebied_2003, toeristengebied_2004, toeristengebied_2005, toeristengebied_2006, toeristengebied_2007, toeristengebied_2008, toeristengebied_2009, toeristengebied_2010, toeristengebied_2011, toeristengebied_2012, toeristengebied_2013, toeristengebied_2014, toeristengebied_2015, toeristengebied_2016, toeristengebied_2017, toeristengebied_2018, toeristengebied_2019, toeristengebied_2020, toeristengroep_2006, toeristengroep_2009, toeristengroep_2010, toeristengroep_2011, toeristengroep_2014, toeristengroep_2015, toeristengroep_2016, toeristengroep_2017, toeristengroep_2018, toeristengroep_2019, toeristengroep_2020, veiligheidsregio_2011, veiligheidsregio_2012, veiligheidsregio_2013, veiligheidsregio_2014, veiligheidsregio_2015, veiligheidsregio_2016, veiligheidsregio_2017, veiligheidsregio_2018, veiligheidsregio_2019, veiligheidsregio_2020, veiligthuisregio_2020, wijk_1995, wijk_1996, wijk_1997, wijk_1998, wijk_1999, wijk_2000, wijk_2001, wijk_2002, wijk_2003, wijk_2004, wijk_2005, wijk_2006, wijk_2007, wijk_2008, wijk_2009, wijk_2010, wijk_2011, wijk_2012, wijk_2013, wijk_2014, wijk_2015, wijk_2016, wijk_2017, wijk_2018, wijk_2019, wijk_2019_niet, wijk_2020, wijk_2020_niet, zorgkantoorregio_2009, zorgkantoorregio_2010, zorgkantoorregio_2011, zorgkantoorregio_2012, zorgkantoorregio_2013, zorgkantoorregio_2014, zorgkantoorregio_2015, zorgkantoorregio_2016, zorgkantoorregio_2017, zorgkantoorregio_2018, zorgkantoorregio_2019, zorgkantoorregio_2020.
This section lists all parameters, which are available to the user, in alphabetical order. Many of these parameters are already documented in the manual above. If you want to make use of a parameter that is documented poorly (sorry for that), please <contact the author>.
area_stack_name: name that explains what the sum of the stacked areas means. The value is of type ‘string’. Figure(s) using ‘area_stack_name’: Buitenlandse obligaties in handen van Nederlanders .
bar_gap_fraction: how much space you want between the bars of two consecutive x-points, where 0 means no gap, 1 means no bars. The value is of type ‘numeric’. Unit: ‘fraction’. Example(s): 0, 0.1. For the default style the value is 0.2. Figure(s) using ‘bar_gap_fraction’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 .
bar_lab_show: you can show the value of the bar on top of it, or in its middle. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): bar_lab_n_decimals, bar_lab_top, bar_lab_increase_y_lim_2. Figure(s) using ‘bar_lab_show’: kansrijk.
box_col_all_equal: if y, all boxes get the same color. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘box_col_all_equal’: Kans om in risicogroep te zitten.
box_median_col: if empty, same color as box. The value is of type ‘string’. Example(s): gray30. Figure(s) using ‘box_median_col’: Kans om in risicogroep te zitten.
box_median_lab_n_decimals: not documented yet. The value is of type ‘numeric’. For the default style the value is 2. Figure(s) using ‘box_median_lab_n_decimals’: Kans om in risicogroep te zitten.
box_median_lab_show: not documented yet. The value is of type ‘bool’. For the default style the value is n. For the box-plot style the value is y. Figure(s) using ‘box_median_lab_show’: Kans om in risicogroep te zitten.
box_median_shape: 0 = line, rest is symbols like in R (try 19 for filled dot). The value is of type ‘numeric’. For the default style the value is 0. Figure(s) using ‘box_median_shape’: Kans om in risicogroep te zitten.
box_quantiles: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is NA. Figure(s) using ‘box_quantiles’: Kans om in risicogroep te zitten.
caption: caption if used in Markdown report. The value is of type ‘string’. Example(s): This text explains what you see In the figure.. Figure(s) using ‘caption’: Bestaande koopwoningen, A discontinuity.
cbs_url: on cbs.nl, find data and click ‘share’. Copy/paste the share-url here. The value is of type ‘string’. Figure(s) using ‘cbs_url’: Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen.
col_order: change color order. You may reuse colors as is show in the example. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 3, 1, 1, 2, 2. Figure(s) using ‘col_order’: Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
color: holds the resulting colors in the same order as they are needed during the plotting phase. If you don’t specify its values, the variable will be automatically set during the pre-processing phase based on palette, highlighting, etc. The value is a list with elements of the type ‘string’ separated by ‘,’.
cpb: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is endeavour, anakiwa, rose, mauvelous, brown, cold_turkey, siren, biscay, dorado. See also parameter(s): palette.
create: using this parameter you can temporarily disable the creation of a figure. James creates figures if and only if this value is y. The default is y, unless a report is generated, in which case the value is set to n. However, if you set ‘create = n’ for the report, then the default is y again. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): filter, publish. Figure(s) using ‘create’: Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen.
custom: your parameters are available as p$parameter. You have acces to your data as follows. The x-values are in p$data[, 1]. The first time series is p$data[, 2], the second is p$data[, 3], etc. If you generate figures from R (not Excel), you may define a function ‘custom <- function(p) { … }’ with a custom implementation instead. The value is of type ‘string’. Example(s): lines(p$data[, 1], mean(p$data[, 2:3])). Figure(s) using ‘custom’: Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Older workers more productive?.
dot_shape: there are over 20 symbols you can choose from; they are all shown in one of the figures in the manual. There are two types of alternatives to the shapes. Firstly, you can use ‘.’ (a period) to specify very small dots. Secondly, you can use a single character (e.g. a letter, digit or sign (e.g. a, 1, or %)). The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 19. For the ppower style the value is NA. Figure(s) using ‘dot_shape’: Verlies van banken na afschrijving 20% van devan GIIPS-landen.
dot_size: size of symbol, c.q. dot. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1. Figure(s) using ‘dot_size’: Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.
empty_fraction_plot: minimal fraction of plot area between outer gridlines and graph. In practice, at least half of this fraction is free above (and below) the graph. [As of 2020-10-14 this functionality is disabled] The value is of type ‘numeric’. Example(s): 0.3. For the default style the value is 0.
fan: color palette tailored for fan charts starting with line, fan1, fan2, fan3 and followed by any other series. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is rose, anakiwa, cerulean, endeavour. See also parameter(s): palette.
first_col_grouping: bars can be grouped. Doing so, gives bars in the same group a common ‘header’. Put group names in the first column, left of the time series names. Time series that belong to the same group should get the same group name. If both one of the group names and one of the time series names contains at least one character (a non-numeric value), first_col_grouping will be set to y automatically. Otherwise, you can do so by hand. The value is of type ‘bool’.
first_row_grouping: boxes can be grouped, which gives the boxes in the same group the same ‘header’ (and the same color if you want to). Put group names in the first row, above the time series names. If these comprise characters, first_row_grouping will be set to y automatically. The value is of type ‘bool’.
footnote: footnote, placed at bottom of figure, aligned right by default. The value is of type ‘string’. Example(s): ¹this is a footnote. Figure(s) using ‘footnote’: Six different line types, Oversterfte in 2020, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Standard normal distribution, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Toeslagen, VMBO, Two series of whiskers in one plot.
footnote_align: to which side you want to align your footnote horizontally. The value is of type ‘string’. Example(s): left, center, right. For the default style the value is right. Figure(s) using ‘footnote_align’: Toeslagen.
footnote_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘footnote_col’: Six different line types, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Toeslagen, VMBO.
footnote_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3. Figure(s) using ‘footnote_font_style’: Toeslagen.
footnote_side: to which side you want to align your footnote vertically. The value is of type ‘string’. Example(s): bottom, top. For the default style the value is bottom. Figure(s) using ‘footnote_side’: Toeslagen.
force_y_at: normally James adds whitespace around the graph (see parameter empty_fraction_plot). You can force James to put the gridlines at precisely y_at (value: y). Otherwise (value: n) James will add extra gridlines if necessary. The value is of type ‘bool’. For the default style the value is n.
forecast_col_transparency: forecasted areas/bars have this transparency level. Zero means no transparancy, one means full transparancy. PLEASE REMOVE THIS PARAMETER. NO LONGER USED. WE NOW ‘shade’ BARS/AREAS The value is of type ‘numeric’. Unit: ‘fraction (0..1]’. Example(s): 0.3, 0.5, 0.7. For the default style the value is 0.
formula: append outcome of formula after last column to data. Please note, your data x-values are in p$data[, 1]. The first series’ values are in p$data[, 2], the second in p$data[, 3] and so on. So, the example determines the mean of the first and second series. The value is of type ‘string’. Example(s): rowMeans(p$data[, 2:3]).
geo_cbs_map: this parameter specifies a specific division of The Netherlands in regions. See appendix of manual for the full list of options currently available. The value is of type ‘string’. Example(s): arbeidsmarktregio_2018. Figure(s) using ‘geo_cbs_map’: geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten.
geo_cbs_url_base: first part of url that is used to download geographic data originating from CBS. Please edit the url if you need to. The value is of type ‘string’. For the default style the value is https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?request=GetFeature&service=WFS&version=2.0.0&outputFormat=json&typeName=cbs_.
geo_col_threshold: the order of the values of this parameter correspond to the order of the colors in your palette. Regions with the first (second, third, etc.) value will get the first (second, third, etc.) color from your palette. Regions with other values will be be colored by linear interpolation of the colors in your palette. Regions with values outside the range of this parameter will get the figure’s background color. The values in this parameter must be stricktly increasing. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. See also parameter(s): palette, palette_blue. Figure(s) using ‘geo_col_threshold’: Arbeidsmarktregio’s in 2020 volgens CBS.
group: names of groups. If given, number of elements should equal number of time series. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): group-1;; group-2;; group-2. See also parameter(s): first_row_grouping, box_col_per_group, name.
group_spacing: extra space between groups. The value is of type ‘numeric’. Example(s): 0, 0.5, 1, 2. For the default style the value is 0. Figure(s) using ‘group_spacing’: VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa.
group_x: the x-positions of the group names. James will set them automatically if not specified by user. Please beware that the group names should be placed at different positions, dependent on the orientation of your plot (i.e., turn = y or turn = n). The value is a list with elements of the type ‘numeric’ separated by ‘,’.
height: height of the resulting image. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.5. For the small style the value is 6.8. For the kansrijk style the value is 7. For the big style the value is 15. For the slide style the value is 11.7. For the slide-wide style the value is 11.7. For the tall style the value is 15.5. For the world-map style the value is 8.5. For the world-map-www style the value is 9.
highlight_series: time series you want to highlight. The value is of type ‘numeric’. Figure(s) using ‘highlight_series’: Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Verlies van banken na afschrijving 20% van devan GIIPS-landen.
highlight_x: if you want to highlight a time series of type ‘bar’, with this parameter you can narrow the highlight to only one given x-position. The x-position specified here, is interpreted as a number (only if all values on the x-axis are numbers) or as a string (if at least one of the values on the x-axis is a string). The value is of type ‘numeric’. Unit: ‘x’. Example(s): bbp. Figure(s) using ‘highlight_x’: Europese steunpakketten.
hist_freq: if y, the histogram graphic is a representation of frequencies (i.e. counts). If n, probability densities are plotted so that the histogram has a total area of one if you set bar_gap_fraction = 0. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): bar_gap_fraction.
hline_bold: by default the lowest gridline is bold. Except if your plot contains bars and zero is visible, then the default is zero. If you want the bold line(s) to appear at other places, you can specify the(ir) y-value(s) here. The value is of type ‘numeric’. For the ppower style the value is 0. See also parameter(s): hline_bold_show. Figure(s) using ‘hline_bold’: Oversterfte in 2020, VWO, VWO, trend-vs-niveau.
hline_dash: not documented yet. The value is of type ‘numeric’. Figure(s) using ‘hline_dash’: Kans om in risicogroep te zitten, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Two series of whiskers in one plot.
kansrijk: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is cerulean, flirt, sun, scarlet_gum, apple, leather, kaitoke_green, wewak. See also parameter(s): palette.
label_font_size: relative to font size of title. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1. Figure(s) using ‘label_font_size’: Overlapping labels (NL, PT), Different alignment for PT.
legend_forecast_show: added shaded block with dashed line to legend if forecast_x is set. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): forecast_x.
legend_n_per_column: number of time series names per column in legend. The value is of type ‘numeric’. Example(s): 1, 4. For the default style the value is 3. For the fan style the value is 4. For the ppower style the value is 4. Figure(s) using ‘legend_n_per_column’: Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Impact no-deal Brexit (horizontal), VMBO, Verwacht verlies in verschillende scenario’s.
legend_order: use this to shuffle order or make selection (example shows only series 1, 3 and 5). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 3, 5. Figure(s) using ‘legend_order’: Buitenlandse obligaties in handen van Nederlanders , Participatie gemeenten, Two series of whiskers in one plot.
legend_symbol_height: not documented yet. The value is of type ‘numeric’. Unit: ‘fraction of legend_line_distance’. For the default style the value is 0.8. See also parameter(s): legend_line_distance.
legend_y: position of top of legend, seen from bottom of figure. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 0.12. For the default style the value is 1.3. For the map style the value is 1.08. Figure(s) using ‘legend_y’: VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Impact no-deal Brexit (horizontal).
line_lty: line type (1: continuous; 2, 3, … have dashes). For dashes the advice is to use 3. Please beware that the forecasted part of a line is automatically dashed, unless you specify this parameter. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 1, 3, 1 if the third line is dashed. For the default style the value is 1. See also parameter(s): line_obs_fc_lty. Figure(s) using ‘line_lty’: Six different line types, Two bandwiths in one plot, Oversterfte in 2020, Groeibijdragen bestedingen, trend-vs-niveau.
line_obs_fc_lty: line types of observed respectively forecasted data. Please use the default settings. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is NA. See also parameter(s): line_lty.
line_symbol: add a symbol to your line. This may be e.g. a dot (1, 19, 20) or a diamond (18). The symbol will be added at the data points that define your line. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 1, 2, …, 23. For the default style the value is 0. See also parameter(s): dot_shape. Figure(s) using ‘line_symbol’: Ontwikkeling EMU-schuld in schokscenario’s.
margin_north: margin above plotting area. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 1.524. For the default style the value is 1.3. For the box-plot style the value is 0.95. For the map style the value is 0.8. For the world-map style the value is 0.5. For the world-map-www style the value is 1. For the no-title style the value is 0.7.
margin_south: margin below plotting area. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 1.905. For the default style the value is 2.3. For the slide-wide style the value is 2.8. For the map style the value is 1.5. For the world-map style the value is 0. For the world-map-www style the value is 0. For the no-legend style the value is 1.25. For the interactive style the value is 3.
margin_west_delta: this is added to margin_west. margin_west is dynamically calculated based on actual width of your y_lab‘s, the labels_margin_left and y_lab_margin_right. This is to guarantee identical alignment of all your labels at the left side of the plot. The value is of type ’numeric’. Unit: ‘fraction of width’. For the default style the value is 0. For the interactive style the value is -0.04.
name: names of the individual time series. These overwrite the series names in the headers of the data sheet and thus also in the legend. Beware: use ;; as separator between names. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): bbp;; inflation;; interest. Figure(s) using ‘name’: Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten.
name_col: this way you can assign specific colors to specific time series, to ensure each series has one color in different figures. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): bbp = blue;; inflation = yellow;; interest = pink. Figure(s) using ‘name_col’: Groeibijdragen bestedingen, Arbeidsmarktregio’s in 2020 volgens CBS.
order: select subset of time series you want to plot. You can also change the order (see example). Please note: the ordering is the very first action (before scaling). It’s the same as re-ordering the columns in your data tab, yourself. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 4, 2. Figure(s) using ‘order’: Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
palette: this parameter defines the colors of your time series, assigned in the order of appearance. James evaluates its elements in a recursive manner. Meaning, if the color itself is a parameter (e.g. ‘cpb’ or ‘kansrijk’), James will replace it with its parameter value. The values will be evaluated in turn. If a value is a parameter that refers directly to a color (e.g. ‘sun’ = #FBAD1D), then it eventually will be replaced by its hex triplet. So, you can combine palettes, color names and hex triplets in any order when defining a palette. You can make a color transparent by appending two hexadecimal numbers to the hex triplet (e.g. #FF0000 is red, and #FF000088 is semi-transparent red). These two numbers indicate the degree of opacity (i.e. 00 means fully transparent, FF means fully opaque). The default value ‘auto’ chooses the palette based on the number of time series you have: for 1, 2 or 3, palette cpb_3 is chosen, for 4 or more, palette cpb is chosen for aesthetic reasons. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): yellow, cpb, #FF0011, appletv. For the default style the value is auto. For the kansrijk style the value is kansrijk. For the fan style the value is fan. For the ppower style the value is ppower. For the map style the value is palette_map. For the world-map style the value is palette_world_map. Figure(s) using ‘palette’: Oversterfte in 2020, Arbeidsmarktregio’s in 2020 volgens CBS.
palette_map: example of a palette with only two blue colors; light one first, dark one second. You can use this palette to auto-generate a gradient of colors for e.g. regions with different values that based on the value each need a different color interpolated from a palette as this. The palette may contain more than two values. The value is a list with elements of the type ‘string’ separated by ‘,’. Unit: ‘hex colors or color names’. Example(s): anakiwa, endeavour, rose. For the default style the value is anakiwa, rose. See also parameter(s): palette.
publish: indicates whether the figure is to be published. You only need to set this value if you work together with other people on one and the same document. Please see the documentation of j_snapshot to create a data file of figures with publish = y. *Pro feature. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): filter.
rect_border: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. Figure(s) using ‘rect_border’: Different alignment for PT.
rect_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is #FF001188. Figure(s) using ‘rect_col’: Overlapping labels (NL, PT), Different alignment for PT.
rect_xleft: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘rect_xleft’: Overlapping labels (NL, PT), Different alignment for PT.
rect_xright: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘rect_xright’: Overlapping labels (NL, PT), Different alignment for PT.
rect_ybottom: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘rect_ybottom’: Overlapping labels (NL, PT), Different alignment for PT.
rect_ytop: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘rect_ytop’: Overlapping labels (NL, PT), Different alignment for PT.
report_include_james_appendix: not documented yet. The value is of type ‘bool’. For the default style the value is y. Figure(s) using ‘report_include_james_appendix’: report.
report_text: you can put your report (R-markdown) text here directly. If you need more space, you can put your text in a sheet and refer to that sheet with parameter tab. The last option is to put your text in a separate file using parameter report_text_file. The value is of type ‘string’. See also parameter(s): tab, report_text_file.
report_text_file: path to the Rmd-file in which you have put the custom r-markdown text for your report (with or without yaml-header). The value is of type ‘file’. Figure(s) using ‘report_text_file’: report.
scale: scale your data. You may use this for example to scale fractions to percentages (scale = 100). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 100. For the default style the value is 1. For the ppower style the value is 100. Figure(s) using ‘scale’: Buitenlandse obligaties in handen van Nederlanders , kansrijk, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Verlies van banken na afschrijving 20% van devan GIIPS-landen.
shading_suppress_x: same as x_shading, except that it is ran after most plotting is done so you can suppress parts of plot. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_shading.
shading_suppress_x_date: same as shading_suppress_x, but then with dates instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘,’. See also parameter(s): shading_suppress_x. Figure(s) using ‘shading_suppress_x_date’: Eerste indruk: corona treft ouderen buitenproportioneel.
style: style in which your figure will be generated. You can select multiple styles. First style has highest priority. The last one is always default; it is implicitly added if you don’t do that manually. The manual provides an overview of the different styles available. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): wide, english. For the kansrijk style the value is no-title. For the box-plot style the value is no-legend. For the world-map style the value is wide. For the world-map-www style the value is world-map. Figure(s) using ‘style’: Six different line types, Inflatie, Inkomenseffecten plannen- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Standard normal distribution, geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, ppower, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, trend-vs-niveau, Impact no-deal Brexit (tall), Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot.
tab: tab name of the tab holding the data for the figure. One figure may refer to multipe tabs, in which case the data will be joined. Multiple figures may refer to the same tab to ‘get their data’, e.g. if you want to make the same figure in different languages. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): tab1; tab1, tab2. Figure(s) using ‘tab’: Hello World, Werkloosheid, Ontwikkeling EMU-schuld in schokscenario’s, Six different line types, Industriële productie en detailhandel, Buitenlandse obligaties in handen van Nederlanders , Two bandwiths in one plot, Oversterfte in 2020, Inflatie, Inkomenseffecten plannen- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Bestaande koopwoningen, Werkverliezers, A discontinuity, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Standard normal distribution, geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, Phones per continent, ppower, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Industriële productie en detailhandel, Older workers more productive?, Toeslagen, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, trend-vs-niveau, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland.
text_col: the color of the label. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): black, rose, green. For the default style the value is black. Figure(s) using ‘text_col’: Oversterfte in 2020, Industriële productie en detailhandel, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
text_font_size: relative font size. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0.7, 1.5. For the default style the value is 1. Figure(s) using ‘text_font_size’: Industriële productie en detailhandel.
text_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 2, 3, 4. For the default style the value is 3. Figure(s) using ‘text_font_style’: Older workers more productive?.
text_label: the text label you want to show in the figure. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): first label;; second label. Figure(s) using ‘text_label’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Rentespreads op overheidsschuld, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
text_offset: distance (‘offset’) of the text label from the specified coordinate in fractions of the width of the letter ‘m’. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 0.5. Figure(s) using ‘text_offset’: Different alignment for PT.
text_pos: alignment of your text label. Leave empty if you want your text centerd on the given (x,y) coordinates. Or: 1 = below, 2 = left, 3 = above, 4 = right. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 2, 3, 4. Figure(s) using ‘text_pos’: Oversterfte in 2020, Older workers more productive?, Rentespreads op overheidsschuld.
text_rotation: the rotation of the label in degrees counterclockwise. Zero (0) means horizontal, 90 means vertical. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 45, 90. For the default style the value is 0. Figure(s) using ‘text_rotation’: Industriële productie en detailhandel, Impact no-deal Brexit (horizontal).
text_x: the x-position of your text label. If your x-axis is numeric, just put the value here. If you use bars, then text_x works as follows. The x-value of the first x-position is 1, i.e. where the first (set of) bars are located. The second is 2, etc. So, if you want your label inbetween the first two x-position, you should use 1.5 as a value. If your x-axis holds dates, please use text_x_date instead. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘text_x’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
text_x_date: if your x-axis consists of dates, you should use this parameter instead of text_x, to indicate what the x-postion of your text label is. Please mark the cell in Excel as a ‘date’ (i.e. not as a regular number). The value is a list with elements of the type ‘Date’ separated by ‘,’. Example(s): 2020-03-18. Figure(s) using ‘text_x_date’: Rentespreads op overheidsschuld.
text_y: the y-postion of your text label. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘text_y’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Rentespreads op overheidsschuld, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
title: the title of your figure. Its font size automatically scales with the length of the title if it would exceed the figure’s width. You may use to add a newline to your title. The value is of type ‘string’. For the ppower style the value is Koopkrachtontwikkeling. Figure(s) using ‘title’: Hello World, Werkloosheid, Ontwikkeling EMU-schuld in schokscenario’s, Six different line types, Industriële productie en detailhandel, Buitenlandse obligaties in handen van Nederlanders , Two bandwiths in one plot, Oversterfte in 2020, Inflatie, Inkomenseffecten plannen- en belastingstelsel, Kans om in risicogroep te zitten, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen, Werkverliezers, A discontinuity, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Standard normal distribution, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, Phones per continent, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Industriële productie en detailhandel, Older workers more productive?, Toeslagen, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland.
transformation: this transformation function will be applied to each y-value individually. The value is of type ‘string’. Example(s): log, function(x) x^2. Figure(s) using ‘transformation’: Werkverliezers.
turn: transpose plot. The value is of type ‘bool’. Example(s): y, n. For the default style the value is n. Figure(s) using ‘turn’: Inkomenseffecten plannen- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Europese steunpakketten, VWO, VWO, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s.
type: chart type per time series. James assumes line for series that are not specified. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): area, area=, bar--, bar=, box, dot, geo, line, param, pie, whisker. For the default style the value is line. For the fan style the value is line, area, area, area, area, area, area. For the ppower style the value is dot, line, line, line. For the histogram style the value is bar--. Figure(s) using ‘type’: report, Buitenlandse obligaties in handen van Nederlanders , Two bandwiths in one plot, Oversterfte in 2020, Inkomenseffecten plannen- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Phones per continent, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland.
vline_dash: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘vline_dash’: Oversterfte in 2020, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
vline_dash_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘vline_dash_col’: Oversterfte in 2020.
vline_dash_date: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): 2020-12-31. Figure(s) using ‘vline_dash_date’: Eerste indruk: corona treft ouderen buitenproportioneel, Rentespreads op overheidsschuld.
whisker_col: color of whiskers. You can supply a different color for each whisker. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘whisker_col’: Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot.
whisker_legend_col: color of whiskers in legend. If no value specified, whiskers will take same color as in figure. The value is of type ‘string’. Figure(s) using ‘whisker_legend_col’: Two series of whiskers in one plot.
whisker_legend_show_n: the number of whiskers you want to show in your legend. If different whiskers for different series have different meanings, you may want to show them all. If you don’t want to see whiskers in your legend, then set whisker_legend_show_n = 0. Please note that you can change the order of the whiskers in your data if needed. The value is of type ‘numeric’. Example(s): 0, 1, 2, …. For the default style the value is 1. Figure(s) using ‘whisker_legend_show_n’: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Two series of whiskers in one plot.
whisker_series: time series which this series corresponds to. The default value is set so that your first whisker definition is superimposed on the first time series (bar–), the second on the second, etc. If, for example, you have a whisker for only one of the time series, you can indicate here which time series that is. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is NA. Figure(s) using ‘whisker_series’: Verwacht verlies in verschillende scenario’s.
width: width of the resulting image. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.5. For the small style the value is 6.8. For the kansrijk style the value is 12.5. For the big style the value is 15. For the slide style the value is 14.2. For the slide-wide style the value is 21. For the wide style the value is 15.5. For the world-map style the value is 15.5.
world_map_projection: maps are flat (2D), while the earth is a sphere (3D). Here you can choose which projection you want to use to project the 3D earth on a 2D flat. https://proj.org/operations/projections/index.html contains an overview. Please use the ‘proj-string’ below the image. See for example the default projection (‘hatano’) which we use: https://proj.org/operations/projections/hatano.html. The value is of type ‘string’. For the world-map style the value is +proj=hatano.
world_map_value: not documented yet. The value is of type ‘numeric’. Figure(s) using ‘world_map_value’: World trade volume change last month:.
x_at: position at which you want labels at the x-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘x_at’: Two series of whiskers in one plot.
x_axis_show: use n if you want to hide x_lab and x_ticks. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): x_lab, x_ticks, y_axis_show. Figure(s) using ‘x_axis_show’: Six different line types, trend-vs-niveau.
x_keep: remove data outside of this range. Keep data inside range. The example removes all data below 0 and above 100. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. Figure(s) using ‘x_keep’: ppower.
x_lab_big_mark_show: for the values at the x-axis, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. Figure(s) using ‘x_lab_big_mark_show’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Toeslagen.
x_lab_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘x_lab_col’: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
x_lab_date_show: if y, dates are shown instead of numbers (n). The value is of type ‘bool’. Example(s): y, n. Figure(s) using ‘x_lab_date_show’: Economische groei in Nederland.
x_lab_font_size: relative font size of the labels on the x-axis. The value is of type ‘numeric’. For the default style the value is 1. Figure(s) using ‘x_lab_font_size’: Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa.
x_lab_rotation: rotate the labels at the x-axis. Zero (0) for horizontal. 90 for vertical. The value is of type ‘numeric’. Unit: ‘degrees’. Example(s): 0, 45, 90. For the default style the value is 0. Figure(s) using ‘x_lab_rotation’: Impact no-deal Brexit (horizontal).
x_lim: restrict the range of the x-axis to this limit. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. Figure(s) using ‘x_lim’: Ontwikkeling EMU-schuld in schokscenario’s, Oversterfte in 2020, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, Two series of whiskers in one plot.
x_lim_follow_data: not documented yet. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘x_lim_follow_data’: Six different line types, Industriële productie en detailhandel, Buitenlandse obligaties in handen van Nederlanders , Werkverliezers.
x_n_decimals: number of digits right of decimal separator on x-axis. If you don’t provide a number, the number of digits will be automatically determined based on the values on the axis. The larger interval the values these span, the less digits shown. The value is of type ‘numeric’. Example(s): 1, 2.
x_scale: scales the x-axis. The value is of type ‘numeric’. Example(s): 0.001, 100. For the default style the value is 1. For the ppower style the value is 0.001. Figure(s) using ‘x_scale’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 .
x_shading: vertical shading (from, to, from, to, etc.). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 2000, 2005, 2010, 2015. See also parameter(s): shading_suppress_x.
x_shading_col: not documented yet. The value is of type ‘string’. For the default style the value is #00000022. Figure(s) using ‘x_shading_col’: Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
x_shading_date: same as x_shading, but then with dates instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘,’. See also parameter(s): x_shading. Figure(s) using ‘x_shading_date’: Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
x_ticks: overrule the default ticks at the x-axis. Leave empty for default (x_at). NB this parameter is used only if x_ticks_date is not given. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1990, 1995, 1997, 2000. Figure(s) using ‘x_ticks’: VWO, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
x_ticks_date: choose one or more if you want ticks at these places. Beware, the default ticks will not be shown now (set x_ticks_show = y if you want them too). The value is a list with elements of the type ‘string’ separated by ‘,’. Unit: ‘unit of time’. Example(s): years, quarters, months, weeks, days. Figure(s) using ‘x_ticks_date’: Economische groei in Nederland.
x_title: title/label at the x-axis. The value is of type ‘string’. Example(s): Years. For the ppower style the value is bruto huishoudinkomen (dzd euro). Figure(s) using ‘x_title’: Hello World, Oversterfte in 2020, Kans om in risicogroep te zitten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Older workers more productive?, Toeslagen, Overlapping labels (NL, PT), Different alignment for PT, trend-vs-niveau, Two series of whiskers in one plot.
x_title_align: not documented yet. The value is of type ‘string’. Example(s): left, center, right. For the default style the value is right. Figure(s) using ‘x_title_align’: Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa.
x_title_v_shift: distance below margin_south. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.6. Figure(s) using ‘x_title_v_shift’: Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa.
y_at: position at which you want labels at the y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 20, 40, 60, 80, 100. Figure(s) using ‘y_at’: ppower, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Impact no-deal Brexit (horizontal).
y_axis: indicates for each of the respective time series whether they are projected on the left (l) y-axis or on the right (r) y-axis. If one or more series are on the right axis, style ‘y-right’ or ‘x-top’ (if ‘turn = y’) are automatically added as a style. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): l, l, l, r, r. For the default style the value is l. See also parameter(s): style, turn. Figure(s) using ‘y_axis’: Verlies van banken na afschrijving 20% van devan GIIPS-landen, Economische groei in Nederland.
y_axis_show: use n if you want to hide y_lab. Contrary to the x-axis, the y-axis does not have ticks. The value is of type ‘bool’. Example(s): y, n. For the default style the value is y. See also parameter(s): y_lab, x_axis_show. Figure(s) using ‘y_axis_show’: trend-vs-niveau.
y_keep: see x_keep. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘y_keep’: ppower.
y_lab: the labels you want at that the positions y_at at your left y-axis. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): y_lab_col, y_r_lab. Figure(s) using ‘y_lab’: Six different line types, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
y_lab_col: color of labels at left y-axis. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. See also parameter(s): y_lab. Figure(s) using ‘y_lab_col’: Impact no-deal Brexit (horizontal).
y_lim: same as x_lim, but for left y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘y_lim’: A discontinuity.
y_n_decimals: number of digits right of decimal separator on y-axis. The value is of type ‘numeric’. Example(s): 1, 2. See also parameter(s): y_r_n_decimals, x_n_decimals.
y_r_lab: the labels you want at the right y-axis. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): y_r_lab, y_r_lab_col. Figure(s) using ‘y_r_lab’: Six different line types, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
y_r_lab_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘y_r_lab_col’: Impact no-deal Brexit (tall).
y_r_n_decimals: number of digits right of decimal separator on right y-axis. The value is of type ‘numeric’. Example(s): 1, 2. See also parameter(s): y_n_decimals, x_n_decimals.
y_right_title: title/label at the right y-axis. The value is of type ‘string’. Figure(s) using ‘y_right_title’: Verlies van banken na afschrijving 20% van devan GIIPS-landen, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), Economische groei in Nederland.
y_right_title_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘y_right_title_col’: Impact no-deal Brexit (tall).
y_title: title/label at the y-axis. The value is of type ‘string’. Example(s): Price (euro). For the ppower style the value is verandering koopkracht (%). Figure(s) using ‘y_title’: Hello World, Werkloosheid, Ontwikkeling EMU-schuld in schokscenario’s, Industriële productie en detailhandel, Buitenlandse obligaties in handen van Nederlanders , Oversterfte in 2020, Inflatie, Inkomenseffecten plannen- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen, Werkverliezers, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst-eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Standard normal distribution, Phones per continent, Verlies van banken na afschrijving 20% van devan GIIPS-landen, Industriële productie en detailhandel, Older workers more productive?, Toeslagen, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, trend-vs-niveau, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland.
y_title_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘y_title_col’: Impact no-deal Brexit (horizontal).